home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1996-08-29 | 30.5 KB | [TEXT/KEEN] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Thu Aug 29 15:49:48 1996, modified Thu Aug 29 15:49:48 1996, creator 'KEEN', type ASCII, 26656 bytes "minimalApp7.c" , at 0x68a0 4330 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KEEN] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 6d 69 6e 69 6d 61 | 6c 41 70 70 37 2e 63 00 |..minima|lApp7.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 45 45 | 4e 01 00 00 00 00 00 00 |.TEXTKEE|N.......|
|00000050| 00 00 00 00 00 68 20 00 | 00 10 ea ae 4b a4 dc ae |.....h .|....K...|
|00000060| 4b a4 dc 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |K.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 08 ee 00 00 |........|........|
|00000080| 2f 2a 20 6d 69 6e 69 6d | 61 6c 41 70 70 37 2e 63 |/* minim|alApp7.c|
|00000090| 20 2d 20 61 20 64 6f 2d | 6e 6f 74 68 69 6e 67 2d | - a do-|nothing-|
|000000a0| 62 75 74 2d 63 61 6c 6c | 20 44 72 61 67 5f 6f 6e |but-call| Drag_on|
|000000b0| 20 4d 6f 64 75 6c 65 73 | 20 20 61 70 70 6c 69 63 | Modules| applic|
|000000c0| 61 74 69 6f 6e 2e 20 20 | 62 79 0d 4b 65 6e 20 45 |ation. |by.Ken E|
|000000d0| 61 72 6c 65 2c 20 31 39 | 38 39 2f 39 31 2f 39 32 |arle, 19|89/91/92|
|000000e0| 2f 39 33 2e 20 43 6f 70 | 79 72 69 67 68 74 3f 20 |/93. Cop|yright? |
|000000f0| 53 68 69 72 6c 65 79 20 | 79 6f 75 20 6d 75 73 74 |Shirley |you must|
|00000100| 20 62 65 20 6a 6f 6b 69 | 6e 67 2e 0d 0d 54 6f 20 | be joki|ng...To |
|00000110| 73 65 65 20 74 68 65 20 | 68 69 6c 69 74 65 73 20 |see the |hilites |
|00000120| 6f 66 20 63 61 6c 6c 69 | 6e 67 20 44 72 61 67 5f |of calli|ng Drag_|
|00000130| 6f 6e 20 4d 6f 64 75 6c | 65 73 2c 20 73 65 61 72 |on Modul|es, sear|
|00000140| 63 68 20 74 68 69 73 20 | 66 69 6c 65 20 66 6f 72 |ch this |file for|
|00000150| 20 2a 2a 2a 2a 2a 0d 0d | 4e 4f 54 45 20 53 79 73 | *****..|NOTE Sys|
|00000160| 74 65 6d 20 37 20 69 73 | 20 72 65 71 75 69 72 65 |tem 7 is| require|
|00000170| 64 20 20 74 6f 20 20 72 | 75 6e 20 20 4d 69 6e 69 |d to r|un Mini|
|00000180| 6d 61 6c 20 20 41 70 70 | 37 2e 20 20 46 75 74 75 |mal App|7. Futu|
|00000190| 72 65 20 20 72 65 6c 65 | 61 73 65 73 20 20 77 69 |re rele|ases wi|
|000001a0| 6c 6c 0d 69 6e 63 6f 72 | 70 6f 72 61 74 65 20 65 |ll.incor|porate e|
|000001b0| 76 65 72 20 6d 6f 72 65 | 20 53 79 73 74 65 6d 20 |ver more| System |
|000001c0| 37 20 66 65 61 74 75 72 | 65 73 2e 0d 0d 54 68 69 |7 featur|es...Thi|
|000001d0| 6e 6b 43 20 70 72 6f 6a | 65 63 74 20 22 4d 69 6e |nkC proj|ect "Min|
|000001e0| 69 6d 61 6c 41 70 70 37 | 2e b9 22 20 6f 75 74 6c |imalApp7|.." outl|
|000001f0| 69 6e 65 3a 0d 28 4e 4f | 54 45 20 4d 61 79 20 39 |ine:.(NO|TE May 9|
|00000200| 36 20 77 65 20 68 61 76 | 65 20 73 77 69 74 63 68 |6 we hav|e switch|
|00000210| 65 64 20 74 6f 20 43 6f | 64 65 57 61 72 72 69 6f |ed to Co|deWarrio|
|00000220| 72 20 61 6e 64 20 74 68 | 65 20 70 72 6f 6a 65 63 |r and th|e projec|
|00000230| 74 20 69 73 20 6e 6f 77 | 20 63 61 6c 6c 0d 22 4d |t is now| call."M|
|00000240| 69 6e 69 6d 61 6c 41 70 | 70 37 2e b5 22 2c 20 62 |inimalAp|p7..", b|
|00000250| 75 74 20 74 68 65 20 73 | 65 74 75 70 20 69 73 20 |ut the s|etup is |
|00000260| 65 73 73 65 6e 74 69 61 | 6c 6c 79 20 74 68 65 20 |essentia|lly the |
|00000270| 73 61 6d 65 20 61 73 20 | 62 65 6c 6f 77 2e 29 0d |same as |below.).|
|00000280| 0d 09 4f 70 74 69 6f 6e | 73 2e 2e 2e 3b 20 3c 4d |..Option|s...; <M|
|00000290| 61 63 48 65 61 64 65 72 | 73 3e 2c 20 43 68 65 63 |acHeader|s>, Chec|
|000002a0| 6b 20 50 6f 69 6e 74 65 | 72 73 2c 20 52 65 71 75 |k Pointe|rs, Requ|
|000002b0| 69 72 65 20 50 72 6f 74 | 6f 79 70 65 73 0d 09 53 |ire Prot|oypes..S|
|000002c0| 65 74 20 50 72 6f 6a 65 | 63 74 20 54 79 70 65 2e |et Proje|ct Type.|
|000002d0| 2e 2e 3b 20 46 69 6c 65 | 20 54 79 70 65 20 41 50 |..; File| Type AP|
|000002e0| 50 4c 2c 20 43 72 65 61 | 74 6f 72 20 3f 3f 3f 3f |PL, Crea|tor ????|
|000002f0| 20 6f 72 20 77 68 61 74 | 65 76 65 72 0d 09 53 69 | or what|ever..Si|
|00000300| 7a 65 20 46 6c 61 67 73 | 3a 0d ca 0d 09 09 09 09 |ze Flags|:.......|
|00000310| 09 09 09 09 09 09 09 09 | c3 4d 75 6c 74 69 46 69 |........|.MultiFi|
|00000320| 6e 64 65 72 2d 41 77 61 | 72 65 0d 09 09 09 09 09 |nder-Awa|re......|
|00000330| 09 09 09 09 09 09 09 c3 | 42 61 63 6b 67 72 6f 75 |........|Backgrou|
|00000340| 6e 64 20 4e 75 6c 6c 20 | 45 76 65 6e 74 73 0d 09 |nd Null |Events..|
|00000350| 09 09 09 09 09 09 09 09 | 09 09 09 c3 53 75 73 70 |........|....Susp|
|00000360| 65 6e 64 20 26 20 52 65 | 73 75 6d 65 20 45 76 65 |end & Re|sume Eve|
|00000370| 6e 74 73 0d 0d 0d 0d 09 | 09 09 09 09 09 09 09 09 |nts.....|........|
|00000380| 09 09 09 20 42 61 63 6b | 67 72 6f 75 6e 64 20 4f |... Back|ground O|
|00000390| 6e 6c 79 0d 09 09 09 09 | 09 09 09 09 09 09 09 09 |nly.....|........|
|000003a0| 20 47 65 74 20 46 72 6f | 6e 74 43 6c 69 63 6b 73 | Get Fro|ntClicks|
|000003b0| 0d 09 09 09 09 09 09 09 | 09 09 09 09 09 20 41 63 |........|..... Ac|
|000003c0| 63 65 70 74 20 43 68 69 | 6c 64 44 69 65 64 45 76 |cept Chi|ldDiedEv|
|000003d0| 65 6e 74 73 0d 0d 0d 09 | 09 09 09 09 09 09 09 09 |ents....|........|
|000003e0| 09 09 09 c3 33 32 2d 42 | 69 74 20 43 6f 6d 70 61 |....32-B|it Compa|
|000003f0| 74 69 62 6c 65 0d 09 09 | 09 09 09 09 09 09 09 09 |tible...|........|
|00000400| 09 09 c3 48 69 67 68 4c | 65 76 65 6c 45 76 65 6e |...HighL|evelEven|
|00000410| 74 2d 41 77 61 72 65 0d | 09 09 09 09 09 09 09 09 |t-Aware.|........|
|00000420| 09 09 09 09 20 41 63 63 | 65 70 74 20 52 65 6d 6f |.... Acc|ept Remo|
|00000430| 74 65 20 48 69 67 68 4c | 65 76 65 6c 45 76 65 6e |te HighL|evelEven|
|00000440| 74 73 0d 09 09 09 09 09 | 09 09 09 09 09 09 09 20 |ts......|....... |
|00000450| 53 74 61 74 69 6f 6e 65 | 72 79 2d 41 77 61 72 65 |Statione|ry-Aware|
|00000460| 0d 09 09 09 09 09 09 09 | 09 09 09 09 09 20 55 73 |........|..... Us|
|00000470| 65 20 54 65 78 74 45 64 | 69 74 20 53 65 72 76 69 |e TextEd|it Servi|
|00000480| 63 65 73 0d 0d 0d 0d 09 | 46 69 6c 65 73 3a 0d 09 |ces.....|Files:..|
|00000490| 09 6d 69 6e 69 6d 61 6c | 41 70 70 37 2e 63 09 2d |.minimal|App7.c.-|
|000004a0| 20 69 6e 20 74 68 65 20 | d2 4d 69 6e 69 6d 61 6c | in the |.Minimal|
|000004b0| 20 41 70 70 37 20 c4 d3 | 20 66 6f 6c 64 65 72 0d | App7 ..| folder.|
|000004c0| 09 09 43 61 6c 6c 5f 52 | 65 73 6f 75 72 63 65 2e |..Call_R|esource.|
|000004d0| 63 20 2d 20 61 6c 73 6f | 20 69 6e 20 74 68 65 20 |c - also| in the |
|000004e0| d2 4d 69 6e 69 6d 61 6c | 20 41 70 70 37 20 c4 d3 |.Minimal| App7 ..|
|000004f0| 20 66 6f 6c 64 65 72 20 | 28 61 20 63 6f 70 79 20 | folder |(a copy |
|00000500| 6f 66 0d 09 09 09 74 68 | 65 20 6f 74 68 65 72 20 |of....th|e other |
|00000510| 43 61 6c 6c 5f 52 65 73 | 6f 75 72 63 65 2e 63 20 |Call_Res|ource.c |
|00000520| 66 69 6c 65 20 69 6e 20 | d2 63 6f 64 65 20 74 6f |file in |.code to|
|00000530| 20 63 61 6c 6c 20 44 72 | 61 67 5f 6f 6e 73 d3 2c | call Dr|ag_ons.,|
|00000540| 0d 09 09 09 73 6c 69 67 | 68 74 6c 79 20 6d 6f 64 |....slig|htly mod|
|00000550| 69 66 69 65 64 20 66 6f | 72 20 75 73 65 20 77 69 |ified fo|r use wi|
|00000560| 74 68 20 4d 69 6e 69 6d | 61 6c 20 41 70 70 37 29 |th Minim|al App7)|
|00000570| 0d 09 48 65 61 64 65 72 | 73 3a 20 3c 4d 61 63 48 |..Header|s: <MacH|
|00000580| 65 61 64 65 72 73 3e 20 | 3c 73 74 72 69 6e 67 2e |eaders> |<string.|
|00000590| 68 3e 0d 09 4c 69 62 73 | 3a 20 4d 61 63 54 72 61 |h>..Libs|: MacTra|
|000005a0| 70 73 2c 20 41 4e 53 49 | 20 28 74 68 65 20 6f 72 |ps, ANSI| (the or|
|000005b0| 64 69 6e 61 72 79 20 6f | 6e 65 2c 20 6e 6f 74 20 |dinary o|ne, not |
|000005c0| 41 4e 53 49 20 61 34 20 | 65 74 63 29 0d 09 52 65 |ANSI a4 |etc)..Re|
|000005d0| 73 6f 75 72 63 65 73 3a | 20 4d 69 6e 69 6d 61 6c |sources:| Minimal|
|000005e0| 41 70 70 37 2e b9 2e 72 | 73 72 63 20 28 6a 75 73 |App7...r|src (jus|
|000005f0| 74 20 61 20 53 49 43 4e | 29 20 69 6e 20 74 68 65 |t a SICN|) in the|
|00000600| 20 d2 4d 69 6e 69 6d 61 | 6c 20 41 70 70 37 20 c4 | .Minima|l App7 .|
|00000610| d3 20 66 6f 6c 64 65 72 | 0d 0d 4e 4f 54 45 20 70 |. folder|..NOTE p|
|00000620| 6c 61 63 65 20 74 68 65 | 20 62 75 69 6c 74 20 4d |lace the| built M|
|00000630| 69 6e 69 6d 61 6c 20 41 | 70 70 37 20 69 6e 20 20 |inimal A|pp7 in |
|00000640| 74 68 65 20 20 73 61 6d | 65 20 20 66 6f 6c 64 65 |the sam|e folde|
|00000650| 72 20 20 61 73 20 20 74 | 68 65 20 20 d2 44 72 61 |r as t|he .Dra|
|00000660| 67 5f 6f 6e 0d 4d 6f 64 | 75 6c 65 73 d3 20 66 6f |g_on.Mod|ules. fo|
|00000670| 6c 64 65 72 2c 20 61 74 | 20 74 68 65 20 73 61 6d |lder, at| the sam|
|00000680| 65 20 6c 65 76 65 6c 2e | 20 54 79 70 69 63 61 6c |e level.| Typical|
|00000690| 6c 79 20 74 68 69 73 20 | 77 69 6c 6c 20 62 65 20 |ly this |will be |
|000006a0| 77 68 65 72 65 20 45 6e | 74 65 72 41 63 74 20 69 |where En|terAct i|
|000006b0| 73 2e 0d 0d 59 6f 75 20 | 73 68 6f 75 6c 64 20 73 |s...You |should s|
|000006c0| 65 65 20 68 41 57 4b 20 | 61 6e 64 20 52 65 61 64 |ee hAWK |and Read|
|000006d0| 20 52 65 73 6f 75 72 63 | 65 20 75 6e 64 65 72 20 | Resourc|e under |
|000006e0| 74 68 65 20 45 64 69 74 | 20 6d 65 6e 75 20 20 77 |the Edit| menu w|
|000006f0| 68 65 6e 20 20 79 6f 75 | 20 20 66 69 72 65 0d 74 |hen you| fire.t|
|00000700| 68 69 73 20 75 70 2e 20 | 4f 70 74 69 6f 6e 73 20 |his up. |Options |
|00000710| 66 6f 72 20 69 6e 70 75 | 74 20 77 69 6c 6c 20 62 |for inpu|t will b|
|00000720| 65 20 6c 69 6d 69 74 65 | 64 20 74 6f 20 d2 53 70 |e limite|d to .Sp|
|00000730| 65 63 69 66 69 63 20 66 | 69 6c 65 d3 20 20 77 69 |ecific f|ile. wi|
|00000740| 74 68 20 20 68 41 57 4b | 2c 0d 61 6e 64 20 6e 65 |th hAWK|,.and ne|
|00000750| 69 74 68 65 72 20 6d 6f | 64 75 6c 65 20 77 69 6c |ither mo|dule wil|
|00000760| 6c 20 62 65 20 61 62 6c | 65 20 74 6f 20 74 65 6c |l be abl|e to tel|
|00000770| 6c 20 74 68 69 73 20 6c | 69 74 74 6c 65 20 20 61 |l this l|ittle a|
|00000780| 70 70 6c 69 63 61 74 69 | 6f 6e 20 20 74 6f 20 20 |pplicati|on to |
|00000790| 73 68 6f 77 0d 79 6f 75 | 20 74 68 65 20 72 65 73 |show.you| the res|
|000007a0| 75 6c 74 73 20 6f 66 20 | 61 20 72 75 6e 20 2d 20 |ults of |a run - |
|000007b0| 79 6f 75 d5 6c 6c 20 68 | 61 76 65 20 74 6f 20 75 |you.ll h|ave to u|
|000007c0| 73 65 20 20 61 20 20 72 | 65 61 6c 20 20 65 64 69 |se a r|eal edi|
|000007d0| 74 6f 72 20 20 66 6f 72 | 20 20 74 68 61 74 2e 0d |tor for| that..|
|000007e0| 4f 74 68 65 72 20 74 68 | 61 6e 20 74 68 61 74 2c |Other th|an that,|
|000007f0| 20 65 76 65 72 79 74 68 | 69 6e 67 20 77 69 6c 6c | everyth|ing will|
|00000800| 20 68 61 70 70 65 6e 20 | 61 73 20 74 68 6f 75 67 | happen |as thoug|
|00000810| 68 20 79 6f 75 20 77 65 | 72 65 20 20 63 61 6c 6c |h you we|re call|
|00000820| 69 6e 67 20 20 74 68 65 | 73 65 0d 66 72 6f 6d 20 |ing the|se.from |
|00000830| 45 6e 74 65 72 41 63 74 | 20 6f 72 20 73 6f 6d 65 |EnterAct| or some|
|00000840| 20 6f 74 68 65 72 20 72 | 65 61 6c 20 61 70 70 6c | other r|eal appl|
|00000850| 69 63 61 74 69 6f 6e 2e | 0d 0d 4f 6e 63 65 20 79 |ication.|..Once y|
|00000860| 6f 75 d5 72 65 20 66 61 | 6d 69 6c 69 61 72 20 77 |ou.re fa|miliar w|
|00000870| 69 74 68 20 68 41 57 4b | 2c 20 69 74 d5 73 20 65 |ith hAWK|, it.s e|
|00000880| 61 73 79 20 74 6f 20 6d | 6f 64 69 66 79 20 61 20 |asy to m|odify a |
|00000890| 70 72 6f 67 72 61 6d 20 | 74 6f 20 74 61 6b 65 20 |program |to take |
|000008a0| 20 69 74 73 0d 69 6e 70 | 75 74 20 66 72 6f 6d 20 | its.inp|ut from |
|000008b0| 61 20 6c 69 73 74 20 6f | 66 20 66 69 6c 65 73 20 |a list o|f files |
|000008c0| 69 6e 20 73 6f 6d 65 20 | 73 70 65 63 69 66 69 63 |in some |specific|
|000008d0| 20 20 66 69 6c 65 2e 20 | 20 46 6f 72 20 20 64 65 | file. | For de|
|000008e0| 74 61 69 6c 73 20 20 73 | 65 65 20 20 74 68 65 0d |tails s|ee the.|
|000008f0| 22 68 41 57 4b 20 55 73 | 65 72 d5 73 20 4d 61 6e |"hAWK Us|er.s Man|
|00000900| 75 61 6c 22 2c 20 69 6e | 20 74 68 65 20 22 4f 74 |ual", in| the "Ot|
|00000910| 68 65 72 20 77 61 79 73 | 20 6f 66 20 73 70 65 63 |her ways| of spec|
|00000920| 69 66 79 69 6e 67 20 69 | 6e 70 75 74 22 20 20 73 |ifying i|nput" s|
|00000930| 65 63 74 69 6f 6e 20 20 | 6f 66 0d 74 68 65 20 22 |ection |of.the "|
|00000940| 41 64 76 61 6e 63 65 64 | 20 74 6f 70 69 63 73 22 |Advanced| topics"|
|00000950| 20 63 68 61 70 74 65 72 | 2e 20 46 6f 72 20 61 6e | chapter|. For an|
|00000960| 20 65 61 73 79 20 77 61 | 79 20 74 6f 20 72 75 6e | easy wa|y to run|
|00000970| 20 61 20 68 41 57 4b 20 | 70 72 6f 67 72 61 6d 20 | a hAWK |program |
|00000980| 20 66 72 6f 6d 0d 4d 69 | 6e 69 6d 61 6c 20 41 70 | from.Mi|nimal Ap|
|00000990| 70 37 20 75 73 69 6e 67 | 20 20 61 20 20 6c 69 73 |p7 using| a lis|
|000009a0| 74 20 20 6f 66 20 20 66 | 69 6c 65 73 2c 20 20 73 |t of f|iles, s|
|000009b0| 65 65 20 20 74 68 65 20 | 20 73 75 70 70 6c 69 65 |ee the | supplie|
|000009c0| 64 20 20 68 41 57 4b 20 | 20 70 72 6f 67 72 61 6d |d hAWK | program|
|000009d0| 0d 22 24 4d 41 37 5f 52 | 75 6e 43 6c 69 70 22 2e |."$MA7_R|unClip".|
|000009e0| 20 4e 6f 74 65 20 74 68 | 6f 75 67 68 20 74 68 61 | Note th|ough tha|
|000009f0| 74 20 22 24 4d 41 37 5f | 52 75 6e 43 6c 69 70 22 |t "$MA7_|RunClip"|
|00000a00| 20 77 6f 72 6b 73 20 70 | 72 6f 70 65 72 6c 79 20 | works p|roperly |
|00000a10| 6f 6e 6c 79 20 69 66 20 | 74 68 65 0d 61 63 74 75 |only if |the.actu|
|00000a20| 61 6c 20 70 72 6f 67 72 | 61 6d 20 62 65 69 6e 67 |al progr|am being|
|00000a30| 20 72 75 6e 20 64 6f 65 | 73 20 6e 6f 74 20 75 73 | run doe|s not us|
|00000a40| 65 20 70 72 65 73 65 74 | 20 76 61 72 69 61 62 6c |e preset| variabl|
|00000a50| 65 73 2c 20 6f 72 20 69 | 66 20 69 74 20 69 73 20 |es, or i|f it is |
|00000a60| 4f 4b 20 66 6f 72 0d 61 | 6c 6c 20 70 72 65 73 65 |OK for.a|ll prese|
|00000a70| 74 20 76 61 72 69 61 62 | 6c 65 73 20 74 6f 20 62 |t variab|les to b|
|00000a80| 65 20 6e 75 6c 6c 2e 0d | 0d 4d 69 6e 69 6d 61 6c |e null..|.Minimal|
|00000a90| 20 41 70 70 37 20 64 69 | 66 66 65 72 73 20 66 72 | App7 di|ffers fr|
|00000aa0| 6f 6d 20 74 68 65 20 65 | 61 72 6c 69 65 72 20 4d |om the e|arlier M|
|00000ab0| 69 6e 69 6d 61 6c 20 41 | 70 70 20 20 70 72 69 6d |inimal A|pp prim|
|00000ac0| 61 72 69 6c 79 20 20 69 | 6e 20 20 74 68 61 74 20 |arily i|n that |
|00000ad0| 20 69 74 0d 77 69 6c 6c | 20 72 75 6e 20 6f 6e 6c | it.will| run onl|
|00000ae0| 79 20 75 6e 64 65 72 20 | 73 79 73 74 65 6d 20 20 |y under |system |
|00000af0| 37 2e 20 20 49 74 20 20 | 73 75 70 70 6f 72 74 73 |7. It |supports|
|00000b00| 20 20 63 6f 6e 63 75 72 | 72 65 6e 74 20 20 68 41 | concur|rent hA|
|00000b10| 57 4b 20 20 65 78 65 63 | 75 74 69 6f 6e 2c 0d 6d |WK exec|ution,.m|
|00000b20| 65 61 6e 69 6e 67 20 79 | 6f 75 20 63 61 6e 20 73 |eaning y|ou can s|
|00000b30| 74 61 72 74 20 75 70 20 | 4d 69 6e 69 6d 61 6c 20 |tart up |Minimal |
|00000b40| 41 70 70 37 2c 20 73 74 | 61 72 74 20 72 75 6e 6e |App7, st|art runn|
|00000b50| 69 6e 67 20 61 20 68 41 | 57 4b 20 20 70 72 6f 67 |ing a hA|WK prog|
|00000b60| 72 61 6d 2c 20 20 61 6e | 64 0d 74 68 65 6e 20 73 |ram, an|d.then s|
|00000b70| 77 69 74 63 68 20 74 6f | 20 73 6f 6d 65 20 6f 74 |witch to| some ot|
|00000b80| 68 65 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |her appl|ication |
|00000b90| 61 6e 64 20 63 6f 6e 74 | 69 6e 75 65 20 77 6f 72 |and cont|inue wor|
|00000ba0| 6b 69 6e 67 2e 20 20 4d | 69 6e 69 6d 61 6c 20 20 |king. M|inimal |
|00000bb0| 41 70 70 37 0d 77 69 6c | 6c 20 6e 6f 74 69 66 79 |App7.wil|l notify|
|00000bc0| 20 79 6f 75 20 77 68 65 | 6e 20 74 68 65 20 68 41 | you whe|n the hA|
|00000bd0| 57 4b 20 70 72 6f 67 72 | 61 6d 20 69 73 20 64 6f |WK progr|am is do|
|00000be0| 6e 65 2e 0d 0d 4d 69 6e | 69 6d 61 6c 20 41 70 70 |ne...Min|imal App|
|00000bf0| 37 20 61 6c 73 6f 20 73 | 75 70 70 6f 72 74 73 20 |7 also s|upports |
|00000c00| 74 68 65 20 22 67 65 74 | 63 6c 69 70 28 29 22 20 |the "get|clip()" |
|00000c10| 20 66 75 6e 63 74 69 6f | 6e 20 20 69 6e 20 20 68 | functio|n in h|
|00000c20| 41 57 4b 2e 20 20 53 69 | 6e 63 65 20 20 69 74 0d |AWK. Si|nce it.|
|00000c30| 64 6f 65 73 6e 27 74 20 | 68 61 76 65 20 61 20 70 |doesn't |have a p|
|00000c40| 72 69 76 61 74 65 20 63 | 6c 69 70 2c 20 69 74 20 |rivate c|lip, it |
|00000c50| 70 61 73 73 65 73 20 74 | 68 65 20 73 79 73 74 65 |passes t|he syste|
|00000c60| 6d 20 20 63 6c 69 70 2e | 20 20 4e 6f 74 65 20 20 |m clip.| Note |
|00000c70| 74 68 61 74 20 20 6d 6f | 73 74 0d 61 70 70 6c 69 |that mo|st.appli|
|00000c80| 63 61 74 69 6f 6e 73 20 | 64 6f 20 6e 6f 74 20 61 |cations |do not a|
|00000c90| 6c 74 65 72 20 74 68 65 | 20 73 79 73 74 65 6d 20 |lter the| system |
|00000ca0| 63 6c 69 70 20 75 6e 74 | 69 6c 20 79 6f 75 20 73 |clip unt|il you s|
|00000cb0| 77 69 74 63 68 20 6f 75 | 74 2e 20 20 54 68 69 73 |witch ou|t. This|
|00000cc0| 20 20 6d 61 79 0d 63 68 | 61 6e 67 65 20 69 6e 20 | may.ch|ange in |
|00000cd0| 74 68 65 20 66 75 74 75 | 72 65 20 61 73 20 61 20 |the futu|re as a |
|00000ce0| 72 65 73 75 6c 74 20 6f | 66 20 41 70 70 6c 65 53 |result o|f AppleS|
|00000cf0| 63 72 69 70 74 2e 0d 0d | 41 73 20 6f 66 20 4a 75 |cript...|As of Ju|
|00000d00| 6e 65 20 39 36 20 69 66 | 20 4d 41 37 20 69 73 20 |ne 96 if| MA7 is |
|00000d10| 73 74 61 72 74 65 64 20 | 77 69 74 68 20 61 20 68 |started |with a h|
|00000d20| 41 57 4b 20 63 6f 6d 6d | 61 6e 64 20 6c 69 6e 65 |AWK comm|and line|
|00000d30| 20 6f 6e 20 74 68 65 20 | 63 6c 69 70 20 20 74 68 | on the |clip th|
|00000d40| 65 6e 0d 4d 41 37 20 77 | 69 6c 6c 20 6c 61 75 6e |en.MA7 w|ill laun|
|00000d50| 63 68 20 68 41 57 4b 20 | 77 69 74 68 20 74 68 65 |ch hAWK |with the|
|00000d60| 20 63 6f 6d 6d 61 6e 64 | 20 6c 69 6e 65 20 28 63 | command| line (c|
|00000d70| 6f 6e 63 75 72 72 65 6e | 74 6c 79 20 75 6e 6c 65 |oncurren|tly unle|
|00000d80| 73 73 20 74 68 65 20 20 | 73 68 69 66 74 0d 6f 72 |ss the |shift.or|
|00000d90| 20 6f 70 74 69 6f 6e 20 | 6b 65 79 20 69 73 20 64 | option |key is d|
|00000da0| 6f 77 6e 29 20 61 6e 64 | 20 71 75 69 74 20 77 68 |own) and| quit wh|
|00000db0| 65 6e 20 74 68 65 20 70 | 72 6f 67 72 61 6d 20 69 |en the p|rogram i|
|00000dc0| 73 20 64 6f 6e 65 2e 20 | 20 4e 6f 74 65 20 20 74 |s done. | Note t|
|00000dd0| 68 61 74 20 20 4d 41 37 | 0d 64 6f 65 73 20 6e 6f |hat MA7|.does no|
|00000de0| 74 20 73 75 70 70 6f 72 | 74 20 74 68 65 20 22 4d |t suppor|t the "M|
|00000df0| 46 53 22 20 28 6d 75 6c | 74 69 2d 66 69 6c 65 20 |FS" (mul|ti-file |
|00000e00| 73 65 6c 65 63 74 69 6f | 6e 29 20 69 6e 70 75 74 |selectio|n) input|
|00000e10| 20 6f 70 74 69 6f 6e 2c | 20 73 6f 20 20 65 69 74 | option,| so eit|
|00000e20| 68 65 72 0d 73 70 65 63 | 69 66 69 63 20 69 6e 70 |her.spec|ific inp|
|00000e30| 75 74 20 66 69 6c 65 73 | 20 6f 72 20 6e 6f 20 69 |ut files| or no i|
|00000e40| 6e 70 75 74 20 66 69 6c | 65 73 20 61 74 20 61 6c |nput fil|es at al|
|00000e50| 6c 20 20 73 68 6f 75 6c | 64 20 20 62 65 20 20 70 |l shoul|d be p|
|00000e60| 61 73 73 65 64 20 20 69 | 6e 20 20 74 68 65 0d 63 |assed i|n the.c|
|00000e70| 6f 6d 6d 61 6e 64 20 6c | 69 6e 65 2e 20 53 69 6e |ommand l|ine. Sin|
|00000e80| 63 65 20 74 68 65 20 73 | 63 72 61 70 20 69 73 20 |ce the s|crap is |
|00000e90| 75 73 65 64 20 20 66 6f | 72 20 20 74 68 65 20 20 |used fo|r the |
|00000ea0| 63 6f 6d 6d 61 6e 64 20 | 20 6c 69 6e 65 2c 20 20 |command | line, |
|00000eb0| 74 68 65 20 20 68 41 57 | 4b 0d 70 72 6f 67 72 61 |the hAW|K.progra|
|00000ec0| 6d 20 73 68 6f 75 6c 64 | 20 6e 6f 74 20 62 65 20 |m should| not be |
|00000ed0| 65 78 70 65 63 74 69 6e | 67 20 74 6f 20 66 69 6e |expectin|g to fin|
|00000ee0| 64 20 69 6e 70 75 74 20 | 76 69 61 20 67 65 74 63 |d input |via getc|
|00000ef0| 6c 69 70 28 29 20 65 69 | 74 68 65 72 2e 0d 2a 2f |lip() ei|ther..*/|
|00000f00| 0d 0d 23 69 6e 63 6c 75 | 64 65 20 3c 41 70 70 6c |..#inclu|de <Appl|
|00000f10| 65 45 76 65 6e 74 73 2e | 68 3e 0d 0d 23 69 6e 63 |eEvents.|h>..#inc|
|00000f20| 6c 75 64 65 20 3c 54 72 | 61 70 73 2e 68 3e 0d 23 |lude <Tr|aps.h>.#|
|00000f30| 69 6e 63 6c 75 64 65 20 | 3c 47 65 73 74 61 6c 74 |include |<Gestalt|
|00000f40| 45 71 75 2e 68 3e 0d 0d | 2f 2a 0d 20 2a 20 53 6f |Equ.h>..|/*. * So|
|00000f50| 6d 65 20 75 73 65 66 75 | 6c 20 6d 61 63 72 6f 73 |me usefu|l macros|
|00000f60| 0d 20 2a 2f 0d 23 64 65 | 66 69 6e 65 20 61 6c 70 |. */.#de|fine alp|
|00000f70| 68 61 28 63 29 09 28 28 | 27 61 27 3c 3d 28 63 29 |ha(c).((|'a'<=(c)|
|00000f80| 26 26 28 63 29 3c 3d 27 | 7a 27 29 7c 7c 28 27 41 |&&(c)<='|z')||('A|
|00000f90| 27 3c 3d 28 63 29 26 26 | 28 63 29 3c 3d 27 5a 27 |'<=(c)&&|(c)<='Z'|
|00000fa0| 29 7c 7c 28 63 29 3d 3d | 27 5f 27 29 0d 23 64 65 |)||(c)==|'_').#de|
|00000fb0| 66 69 6e 65 20 6e 75 6d | 28 63 29 09 09 28 27 30 |fine num|(c)..('0|
|00000fc0| 27 3c 3d 28 63 29 20 26 | 26 20 28 63 29 3c 3d 27 |'<=(c) &|& (c)<='|
|00000fd0| 39 27 29 0d 23 64 65 66 | 69 6e 65 20 61 6c 70 68 |9').#def|ine alph|
|00000fe0| 61 6e 75 6d 28 63 29 09 | 28 61 6c 70 68 61 28 63 |anum(c).|(alpha(c|
|00000ff0| 29 7c 7c 6e 75 6d 28 63 | 29 29 0d 0d 2f 2a 20 53 |)||num(c|))../* S|
|00001000| 6f 6d 65 20 75 73 65 66 | 75 6c 20 6b 65 79 20 63 |ome usef|ul key c|
|00001010| 6f 6e 73 74 61 6e 74 73 | 0d 2a 2f 0d 23 64 65 66 |onstants|.*/.#def|
|00001020| 69 6e 65 09 09 43 52 09 | 09 09 09 30 78 30 44 09 |ine..CR.|...0x0D.|
|00001030| 09 2f 2a 20 72 65 74 75 | 72 6e 09 09 09 09 2a 2f |./* retu|rn....*/|
|00001040| 0d 23 64 65 66 69 6e 65 | 09 09 42 4c 41 4e 4b 09 |.#define|..BLANK.|
|00001050| 09 09 27 20 27 20 09 09 | 2f 2a 20 61 20 73 70 61 |..' ' ..|/* a spa|
|00001060| 63 65 20 2a 2f 0d 23 64 | 65 66 69 6e 65 09 09 4f |ce */.#d|efine..O|
|00001070| 50 54 42 4c 09 09 09 27 | ca 27 09 09 09 2f 2a 20 |PTBL...'|.'.../* |
|00001080| 6f 70 74 69 6f 6e 2d 73 | 70 61 63 65 20 2a 2f 0d |option-s|pace */.|
|00001090| 0d 2f 2a 20 6b 4f 53 45 | 76 65 6e 74 20 69 73 20 |./* kOSE|vent is |
|000010a0| 74 68 65 20 65 76 65 6e | 74 20 6e 75 6d 62 65 72 |the even|t number|
|000010b0| 20 6f 66 20 74 68 65 20 | 73 75 73 70 65 6e 64 2f | of the |suspend/|
|000010c0| 72 65 73 75 6d 65 20 61 | 6e 64 20 6d 6f 75 73 65 |resume a|nd mouse|
|000010d0| 2d 6d 6f 76 65 64 20 65 | 76 65 6e 74 73 20 73 65 |-moved e|vents se|
|000010e0| 6e 74 0d 20 20 20 62 79 | 20 4d 75 6c 74 69 46 69 |nt. by| MultiFi|
|000010f0| 6e 64 65 72 2e 20 4f 6e | 63 65 20 77 65 20 64 65 |nder. On|ce we de|
|00001100| 74 65 72 6d 69 6e 65 20 | 74 68 61 74 20 61 6e 20 |termine |that an |
|00001110| 65 76 65 6e 74 20 69 73 | 20 61 6e 20 4f 53 45 76 |event is| an OSEv|
|00001120| 65 6e 74 2c 20 77 65 20 | 6c 6f 6f 6b 20 61 74 20 |ent, we |look at |
|00001130| 74 68 65 0d 20 20 20 68 | 69 67 68 20 62 79 74 65 |the. h|igh byte|
|00001140| 20 6f 66 20 74 68 65 20 | 6d 65 73 73 61 67 65 20 | of the |message |
|00001150| 73 65 6e 74 20 74 6f 20 | 64 65 74 65 72 6d 69 6e |sent to |determin|
|00001160| 65 20 77 68 69 63 68 20 | 6b 69 6e 64 20 69 74 20 |e which |kind it |
|00001170| 69 73 2e 20 54 6f 20 64 | 69 66 66 65 72 65 6e 74 |is. To d|ifferent|
|00001180| 69 61 74 65 0d 20 20 20 | 73 75 73 70 65 6e 64 20 |iate. |suspend |
|00001190| 61 6e 64 20 72 65 73 75 | 6d 65 20 65 76 65 6e 74 |and resu|me event|
|000011a0| 73 20 77 65 20 63 68 65 | 63 6b 20 74 68 65 20 72 |s we che|ck the r|
|000011b0| 65 73 75 6d 65 4d 61 73 | 6b 20 62 69 74 2e 20 2a |esumeMas|k bit. *|
|000011c0| 2f 0d 23 64 65 66 69 6e | 65 09 6b 4f 53 45 76 65 |/.#defin|e.kOSEve|
|000011d0| 6e 74 09 09 09 09 61 70 | 70 34 45 76 74 09 2f 2a |nt....ap|p4Evt./*|
|000011e0| 20 65 76 65 6e 74 20 75 | 73 65 64 20 62 79 20 4d | event u|sed by M|
|000011f0| 75 6c 74 69 46 69 6e 64 | 65 72 20 2a 2f 0d 23 64 |ultiFind|er */.#d|
|00001200| 65 66 69 6e 65 09 6b 53 | 75 73 70 65 6e 64 52 65 |efine.kS|uspendRe|
|00001210| 73 75 6d 65 4d 65 73 73 | 61 67 65 09 31 09 09 2f |sumeMess|age.1../|
|00001220| 2a 20 68 69 67 68 20 62 | 79 74 65 20 6f 66 20 73 |* high b|yte of s|
|00001230| 75 73 70 65 6e 64 2f 72 | 65 73 75 6d 65 20 65 76 |uspend/r|esume ev|
|00001240| 65 6e 74 20 6d 65 73 73 | 61 67 65 20 2a 2f 0d 23 |ent mess|age */.#|
|00001250| 64 65 66 69 6e 65 09 6b | 52 65 73 75 6d 65 4d 61 |define.k|ResumeMa|
|00001260| 73 6b 09 09 09 09 31 09 | 09 2f 2a 20 62 69 74 20 |sk....1.|./* bit |
|00001270| 6f 66 20 6d 65 73 73 61 | 67 65 20 66 69 65 6c 64 |of messa|ge field|
|00001280| 20 66 6f 72 20 72 65 73 | 75 6d 65 20 76 73 2e 20 | for res|ume vs. |
|00001290| 73 75 73 70 65 6e 64 20 | 2a 2f 0d 23 64 65 66 69 |suspend |*/.#defi|
|000012a0| 6e 65 09 6b 4d 6f 75 73 | 65 4d 6f 76 65 64 4d 65 |ne.kMous|eMovedMe|
|000012b0| 73 73 61 67 65 09 09 30 | 78 46 41 09 2f 2a 20 68 |ssage..0|xFA./* h|
|000012c0| 69 67 68 20 62 79 74 65 | 20 6f 66 20 6d 6f 75 73 |igh byte| of mous|
|000012d0| 65 2d 6d 6f 76 65 64 20 | 65 76 65 6e 74 20 6d 65 |e-moved |event me|
|000012e0| 73 73 61 67 65 20 2a 2f | 0d 0d 2f 2a 09 6b 45 78 |ssage */|../*.kEx|
|000012f0| 74 72 65 6d 65 4e 65 67 | 20 61 6e 64 20 6b 45 78 |tremeNeg| and kEx|
|00001300| 74 72 65 6d 65 50 6f 73 | 20 61 72 65 20 75 73 65 |tremePos| are use|
|00001310| 64 20 74 6f 20 73 65 74 | 20 75 70 20 77 69 64 65 |d to set| up wide|
|00001320| 20 6f 70 65 6e 20 72 65 | 63 74 61 6e 67 6c 65 73 | open re|ctangles|
|00001330| 20 61 6e 64 20 72 65 67 | 69 6f 6e 73 2e 20 2a 2f | and reg|ions. */|
|00001340| 0d 23 64 65 66 69 6e 65 | 20 6b 45 78 74 72 65 6d |.#define| kExtrem|
|00001350| 65 4e 65 67 09 09 09 09 | 2d 33 32 37 36 38 0d 23 |eNeg....|-32768.#|
|00001360| 64 65 66 69 6e 65 20 6b | 45 78 74 72 65 6d 65 50 |define k|ExtremeP|
|00001370| 6f 73 09 09 09 09 28 33 | 32 37 36 37 20 2d 20 31 |os....(3|2767 - 1|
|00001380| 29 20 2f 2a 20 72 65 71 | 75 69 72 65 64 20 74 6f |) /* req|uired to|
|00001390| 20 61 64 64 72 65 73 73 | 20 61 6e 20 6f 6c 64 20 | address| an old |
|000013a0| 72 65 67 69 6f 6e 20 62 | 75 67 20 2a 2f 0d 0d 23 |region b|ug */..#|
|000013b0| 69 66 6e 64 65 66 20 5f | 55 6e 69 6d 70 6c 65 6d |ifndef _|Unimplem|
|000013c0| 65 6e 74 65 64 0d 23 64 | 65 66 69 6e 65 09 5f 55 |ented.#d|efine._U|
|000013d0| 6e 69 6d 70 6c 65 6d 65 | 6e 74 65 64 20 30 78 39 |nimpleme|nted 0x9|
|000013e0| 46 0d 23 65 6e 64 69 66 | 0d 23 69 66 6e 64 65 66 |F.#endif|.#ifndef|
|000013f0| 20 5f 57 61 69 74 4e 65 | 78 74 45 76 65 6e 74 0d | _WaitNe|xtEvent.|
|00001400| 23 64 65 66 69 6e 65 20 | 5f 57 61 69 74 4e 65 78 |#define |_WaitNex|
|00001410| 74 45 76 65 6e 74 20 30 | 78 36 30 0d 23 65 6e 64 |tEvent 0|x60.#end|
|00001420| 69 66 0d 0d 0d 23 69 66 | 6e 64 65 66 20 4e 55 4c |if...#if|ndef NUL|
|00001430| 4c 0d 23 64 65 66 69 6e | 65 20 4e 55 4c 4c 09 09 |L.#defin|e NULL..|
|00001440| 28 28 76 6f 69 64 20 2a | 29 20 30 29 0d 23 65 6e |((void *|) 0).#en|
|00001450| 64 69 66 0d 0d 23 64 65 | 66 69 6e 65 09 09 41 50 |dif..#de|fine..AP|
|00001460| 50 4c 45 49 44 09 09 09 | 09 31 35 0d 23 64 65 66 |PLEID...|.15.#def|
|00001470| 69 6e 65 09 09 46 49 4c | 45 49 44 09 09 09 09 31 |ine..FIL|EID....1|
|00001480| 36 0d 23 64 65 66 69 6e | 65 09 09 45 44 49 54 49 |6.#defin|e..EDITI|
|00001490| 44 09 09 09 09 31 37 0d | 23 64 65 66 69 6e 65 09 |D....17.|#define.|
|000014a0| 09 51 55 49 54 09 09 09 | 09 31 32 0d 0d 23 64 65 |.QUIT...|.12..#de|
|000014b0| 66 69 6e 65 09 09 57 69 | 6e 64 6f 77 44 61 74 61 |fine..Wi|ndowData|
|000014c0| 50 74 72 09 09 57 69 6e | 64 6f 77 50 74 72 0d 0d |Ptr..Win|dowPtr..|
|000014d0| 2f 2a 20 41 75 67 6d 65 | 6e 74 65 64 20 72 65 63 |/* Augme|nted rec|
|000014e0| 6f 72 64 20 6f 66 20 65 | 76 65 6e 74 20 2d 20 73 |ord of e|vent - s|
|000014f0| 65 65 20 53 65 74 45 76 | 65 6e 74 44 65 74 61 69 |ee SetEv|entDetai|
|00001500| 6c 73 28 29 20 2a 2f 0d | 73 74 72 75 63 74 20 45 |ls() */.|struct E|
|00001510| 76 65 6e 74 44 65 74 61 | 69 6c 73 0d 09 7b 0d 09 |ventDeta|ils..{..|
|00001520| 45 76 65 6e 74 52 65 63 | 6f 72 64 09 09 65 76 65 |EventRec|ord..eve|
|00001530| 6e 74 3b 09 09 09 2f 2a | 20 49 4d 20 31 20 70 67 |nt;.../*| IM 1 pg|
|00001540| 20 32 34 39 20 2a 2f 0d | 09 57 69 6e 64 6f 77 50 | 249 */.|.WindowP|
|00001550| 74 72 09 09 6d 6f 75 73 | 65 44 6f 77 6e 57 69 6e |tr..mous|eDownWin|
|00001560| 64 6f 77 3b 2f 2a 20 6e | 6f 74 20 6e 65 63 65 73 |dow;/* n|ot neces|
|00001570| 73 61 72 69 6c 79 20 66 | 72 6f 6e 74 20 77 69 6e |sarily f|ront win|
|00001580| 64 6f 77 20 2a 2f 0d 09 | 50 6f 69 6e 74 09 09 09 |dow */..|Point...|
|00001590| 6c 6f 63 61 6c 57 68 65 | 72 65 3b 09 09 2f 2a 20 |localWhe|re;../* |
|000015a0| 6d 6f 75 73 65 64 6f 77 | 6e 20 70 6f 69 6e 74 20 |mousedow|n point |
|000015b0| 69 6e 20 6c 6f 63 61 6c | 20 63 6f 6f 72 64 69 6e |in local| coordin|
|000015c0| 61 74 65 73 20 2a 2f 0d | 09 43 6f 6e 74 72 6f 6c |ates */.|.Control|
|000015d0| 48 61 6e 64 6c 65 09 77 | 68 69 63 68 43 6f 6e 74 |Handle.w|hichCont|
|000015e0| 72 6f 6c 3b 0d 09 73 68 | 6f 72 74 20 20 20 20 09 |rol;..sh|ort .|
|000015f0| 09 09 77 68 61 74 50 61 | 72 74 3b 0d 09 42 6f 6f |..whatPa|rt;..Boo|
|00001600| 6c 65 61 6e 09 09 09 73 | 68 69 66 74 44 6f 77 6e |lean...s|hiftDown|
|00001610| 2c 20 63 61 70 73 4c 6f | 63 6b 44 6f 77 6e 2c 20 |, capsLo|ckDown, |
|00001620| 6f 70 74 69 6f 6e 44 6f | 77 6e 2c 20 63 6f 6d 6d |optionDo|wn, comm|
|00001630| 61 6e 64 44 6f 77 6e 2c | 20 64 6f 75 62 6c 65 43 |andDown,| doubleC|
|00001640| 6c 69 63 6b 3b 0d 09 7d | 3b 0d 74 79 70 65 64 65 |lick;..}|;.typede|
|00001650| 66 20 73 74 72 75 63 74 | 20 45 76 65 6e 74 44 65 |f struct| EventDe|
|00001660| 74 61 69 6c 73 20 45 76 | 65 6e 74 44 65 74 61 69 |tails Ev|entDetai|
|00001670| 6c 73 3b 0d 0d 2f 2a 20 | 2d 2d 2d 2d 2d 2d 2d 2d |ls;../* |--------|
|00001680| 2d 20 75 73 65 66 75 6c | 20 67 6c 6f 62 61 6c 73 |- useful| globals|
|00001690| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | -------|--------|
|000016a0| 2d 20 2a 2f 0d 4d 65 6e | 75 48 61 6e 64 6c 65 20 |- */.Men|uHandle |
|000016b0| 20 09 61 70 70 6c 65 4d | 65 6e 75 2c 20 66 69 6c | .appleM|enu, fil|
|000016c0| 65 4d 65 6e 75 2c 20 65 | 64 69 74 4d 65 6e 75 3b |eMenu, e|ditMenu;|
|000016d0| 0d 42 6f 6f 6c 65 61 6e | 09 09 09 67 49 6e 42 61 |.Boolean|...gInBa|
|000016e0| 63 6b 67 72 6f 75 6e 64 | 2c 20 67 51 75 69 74 74 |ckground|, gQuitt|
|000016f0| 69 6e 67 3b 0d 43 75 72 | 73 48 61 6e 64 6c 65 09 |ing;.Cur|sHandle.|
|00001700| 09 49 42 65 61 6d 2c 20 | 57 61 74 63 68 3b 0d 45 |.IBeam, |Watch;.E|
|00001710| 76 65 6e 74 44 65 74 61 | 69 6c 73 20 20 09 67 45 |ventDeta|ils .gE|
|00001720| 76 74 44 65 74 61 69 6c | 73 3b 09 09 2f 2a 20 69 |vtDetail|s;../* i|
|00001730| 6e 66 6f 20 61 62 6f 75 | 74 20 6c 61 74 65 73 74 |nfo abou|t latest|
|00001740| 20 65 76 65 6e 74 20 2a | 2f 0d 42 6f 6f 6c 65 61 | event *|/.Boolea|
|00001750| 6e 09 09 09 64 61 49 6e | 46 72 6f 6e 74 3b 20 09 |n...daIn|Front; .|
|00001760| 09 09 2f 2a 20 66 6f 72 | 20 73 63 72 61 70 20 63 |../* for| scrap c|
|00001770| 6f 6e 76 65 72 73 69 6f | 6e 20 2a 2f 0d 2f 2a 20 |onversio|n */./* |
|00001780| 63 75 72 73 6f 72 20 6d | 61 6e 61 67 65 6d 65 6e |cursor m|anagemen|
|00001790| 74 2c 20 63 61 6c 6c 65 | 64 20 62 79 20 61 6c 6c |t, calle|d by all|
|000017a0| 20 65 76 65 6e 74 20 6c | 6f 6f 70 73 20 2a 2f 0d | event l|oops */.|
|000017b0| 52 67 6e 48 61 6e 64 6c | 65 09 63 75 72 73 6f 72 |RgnHandl|e.cursor|
|000017c0| 52 67 6e 3b 0d 73 74 61 | 74 69 63 20 52 67 6e 48 |Rgn;.sta|tic RgnH|
|000017d0| 61 6e 64 6c 65 09 61 72 | 72 6f 77 52 67 6e 3b 0d |andle.ar|rowRgn;.|
|000017e0| 73 74 61 74 69 63 20 52 | 67 6e 48 61 6e 64 6c 65 |static R|gnHandle|
|000017f0| 09 69 42 65 61 6d 52 67 | 6e 3b 0d 2f 2a 2a 2a 2a |.iBeamRg|n;./****|
|00001800| 2a 2a 2a 20 74 6f 20 68 | 61 6e 64 6c 65 20 63 6f |*** to h|andle co|
|00001810| 6e 63 75 72 72 65 6e 74 | 20 44 72 61 67 5f 6f 6e |ncurrent| Drag_on|
|00001820| 20 4d 6f 64 75 6c 65 73 | 2c 20 66 6f 72 20 76 65 | Modules|, for ve|
|00001830| 72 73 69 6f 6e 20 32 20 | 6f 72 20 67 72 65 61 74 |rsion 2 |or great|
|00001840| 65 72 2e 20 2a 2f 0d 42 | 6f 6f 6c 65 61 6e 20 67 |er. */.B|oolean g|
|00001850| 4e 6f 74 69 66 79 69 6e | 67 3b 20 2f 2a 20 68 41 |Notifyin|g; /* hA|
|00001860| 57 4b 20 66 69 6e 69 73 | 68 65 64 20 77 69 74 68 |WK finis|hed with|
|00001870| 20 4d 69 6e 69 6d 61 6c | 20 41 70 70 20 69 6e 20 | Minimal| App in |
|00001880| 74 68 65 20 62 61 63 6b | 67 72 6f 75 6e 64 2e 20 |the back|ground. |
|00001890| 2a 2f 0d 42 6f 6f 6c 65 | 61 6e 20 67 48 61 77 6b |*/.Boole|an gHawk|
|000018a0| 49 73 52 75 6e 6e 69 6e | 67 3b 20 2f 2a 20 49 66 |IsRunnin|g; /* If|
|000018b0| 20 74 72 75 65 2c 20 6e | 6f 20 71 75 69 74 74 69 | true, n|o quitti|
|000018c0| 6e 67 20 61 6e 64 20 6c | 65 73 73 20 73 6c 65 65 |ng and l|ess slee|
|000018d0| 70 69 6e 67 2e 20 2a 2f | 0d 4e 4d 52 65 63 09 67 |ping. */|.NMRec.g|
|000018e0| 4e 6f 74 69 66 79 52 65 | 63 3b 0d 0d 2f 2a 2a 2a |NotifyRe|c;../***|
|000018f0| 2a 2a 2a 2a 20 54 68 65 | 20 74 77 6f 20 66 75 6e |**** The| two fun|
|00001900| 63 74 69 6f 6e 73 20 66 | 72 6f 6d 20 65 6c 73 65 |ctions f|rom else|
|00001910| 77 68 65 72 65 20 2a 2f | 0d 2f 2a 20 43 61 6c 6c |where */|./* Call|
|00001920| 5f 52 65 73 6f 75 72 63 | 65 2e 63 20 2a 2f 0d 65 |_Resourc|e.c */.e|
|00001930| 78 74 65 72 6e 20 76 6f | 69 64 20 49 6e 69 74 43 |xtern vo|id InitC|
|00001940| 61 6c 6c 52 65 73 6f 75 | 72 63 65 73 28 73 68 6f |allResou|rces(sho|
|00001950| 72 74 20 76 52 65 66 4e | 75 6d 46 6f 72 41 70 70 |rt vRefN|umForApp|
|00001960| 2c 20 0d 09 63 68 61 72 | 20 2a 63 6f 64 65 46 6f |, ..char| *codeFo|
|00001970| 6c 64 65 72 4e 61 6d 65 | 2c 20 73 68 6f 72 74 20 |lderName|, short |
|00001980| 6d 65 6e 75 49 44 29 3b | 0d 2f 2a 20 4e 6f 74 65 |menuID);|./* Note|
|00001990| 20 22 56 45 52 53 49 4f | 4e 32 22 20 6f 66 20 43 | "VERSIO|N2" of C|
|000019a0| 61 6c 6c 52 65 73 6f 75 | 72 63 65 28 29 20 69 73 |allResou|rce() is|
|000019b0| 20 62 65 69 6e 67 20 75 | 73 65 64 2e 20 2a 2f 0d | being u|sed. */.|
|000019c0| 65 78 74 65 72 6e 20 76 | 6f 69 64 20 43 61 6c 6c |extern v|oid Call|
|000019d0| 52 65 73 6f 75 72 63 65 | 0d 09 28 73 68 6f 72 74 |Resource|..(short|
|000019e0| 09 09 6d 65 6e 75 49 44 | 2c 0d 09 73 68 6f 72 74 |..menuID|,..short|
|000019f0| 09 09 69 74 65 6d 2c 0d | 09 42 6f 6f 6c 65 61 6e |..item,.|.Boolean|
|00001a00| 09 09 63 6f 6e 63 75 72 | 72 65 6e 74 2c 09 09 2f |..concur|rent,../|
|00001a10| 2f 20 73 65 74 20 46 41 | 4c 53 45 20 69 66 20 79 |/ set FA|LSE if y|
|00001a20| 6f 75 20 64 6f 6e 27 74 | 20 73 75 70 70 6f 72 74 |ou don't| support|
|00001a30| 20 63 6f 6e 63 75 72 72 | 65 6e 74 20 6d 6f 64 65 | concurr|ent mode|
|00001a40| 0d 09 63 68 61 72 09 09 | 2a 63 6f 6d 6d 61 6e 64 |..char..|*command|
|00001a50| 4c 69 6e 65 50 09 2f 2f | 20 2d 3e 20 63 6f 6d 70 |LineP.//| -> comp|
|00001a60| 6c 65 74 65 20 63 6f 6d | 6d 61 6e 64 20 6c 69 6e |lete com|mand lin|
|00001a70| 65 20 6f 72 20 4e 55 4c | 4c 0d 09 29 3b 0d 0d 2f |e or NUL|L..);../|
|00001a80| 2a 20 50 72 6f 74 6f 74 | 79 70 65 73 20 66 6f 72 |* Protot|ypes for|
|00001a90| 20 66 75 6e 63 74 69 6f | 6e 73 20 64 65 66 69 6e | functio|ns defin|
|00001aa0| 65 64 20 69 6e 20 74 68 | 69 73 20 66 69 6c 65 20 |ed in th|is file |
|00001ab0| 2a 2f 0d 73 68 6f 72 74 | 20 6d 61 69 6e 28 76 6f |*/.short| main(vo|
|00001ac0| 69 64 29 3b 0d 76 6f 69 | 64 20 44 6f 53 74 61 6e |id);.voi|d DoStan|
|00001ad0| 64 61 72 64 49 6e 69 74 | 73 28 76 6f 69 64 29 3b |dardInit|s(void);|
|00001ae0| 0d 76 6f 69 64 20 4d 61 | 6b 65 4d 65 6e 75 73 28 |.void Ma|keMenus(|
|00001af0| 76 6f 69 64 29 3b 0d 42 | 6f 6f 6c 65 61 6e 20 44 |void);.B|oolean D|
|00001b00| 6f 4d 65 6e 75 28 6c 6f | 6e 67 29 3b 0d 2f 2a 20 |oMenu(lo|ng);./* |
|00001b10| 41 70 70 6c 65 20 65 76 | 65 6e 74 20 68 61 6e 64 |Apple ev|ent hand|
|00001b20| 6c 65 72 73 20 2a 2f 0d | 70 61 73 63 61 6c 20 4f |lers */.|pascal O|
|00001b30| 53 45 72 72 20 48 61 6e | 64 6c 65 5f 61 65 76 74 |SErr Han|dle_aevt|
|00001b40| 5f 6f 61 70 70 28 41 70 | 70 6c 65 45 76 65 6e 74 |_oapp(Ap|pleEvent|
|00001b50| 20 2a 74 68 65 41 70 70 | 6c 65 45 76 65 6e 74 2c | *theApp|leEvent,|
|00001b60| 20 41 70 70 6c 65 45 76 | 65 6e 74 20 2a 72 65 70 | AppleEv|ent *rep|
|00001b70| 6c 79 2c 20 6c 6f 6e 67 | 20 6d 79 52 65 66 43 6f |ly, long| myRefCo|
|00001b80| 6e 29 3b 0d 70 61 73 63 | 61 6c 20 4f 53 45 72 72 |n);.pasc|al OSErr|
|00001b90| 20 48 61 6e 64 6c 65 5f | 61 65 76 74 5f 6f 64 6f | Handle_|aevt_odo|
|00001ba0| 63 28 41 70 70 6c 65 45 | 76 65 6e 74 20 2a 74 68 |c(AppleE|vent *th|
|00001bb0| 65 41 70 70 6c 65 45 76 | 65 6e 74 2c 20 41 70 70 |eAppleEv|ent, App|
|00001bc0| 6c 65 45 76 65 6e 74 20 | 2a 72 65 70 6c 79 2c 20 |leEvent |*reply, |
|00001bd0| 6c 6f 6e 67 20 6d 79 52 | 65 66 43 6f 6e 29 3b 0d |long myR|efCon);.|
|00001be0| 70 61 73 63 61 6c 20 4f | 53 45 72 72 20 48 61 6e |pascal O|SErr Han|
|00001bf0| 64 6c 65 5f 61 65 76 74 | 5f 70 64 6f 63 28 41 70 |dle_aevt|_pdoc(Ap|
|00001c00| 70 6c 65 45 76 65 6e 74 | 20 2a 74 68 65 41 70 70 |pleEvent| *theApp|
|00001c10| 6c 65 45 76 65 6e 74 2c | 20 41 70 70 6c 65 45 76 |leEvent,| AppleEv|
|00001c20| 65 6e 74 20 2a 72 65 70 | 6c 79 2c 20 6c 6f 6e 67 |ent *rep|ly, long|
|00001c30| 20 6d 79 52 65 66 43 6f | 6e 29 3b 0d 70 61 73 63 | myRefCo|n);.pasc|
|00001c40| 61 6c 20 4f 53 45 72 72 | 20 48 61 6e 64 6c 65 5f |al OSErr| Handle_|
|00001c50| 61 65 76 74 5f 71 75 69 | 74 28 41 70 70 6c 65 45 |aevt_qui|t(AppleE|
|00001c60| 76 65 6e 74 20 2a 74 68 | 65 41 70 70 6c 65 45 76 |vent *th|eAppleEv|
|00001c70| 65 6e 74 2c 20 41 70 70 | 6c 65 45 76 65 6e 74 20 |ent, App|leEvent |
|00001c80| 2a 72 65 70 6c 79 2c 20 | 6c 6f 6e 67 20 6d 79 52 |*reply, |long myR|
|00001c90| 65 66 43 6f 6e 29 3b 0d | 4f 53 45 72 72 20 4d 69 |efCon);.|OSErr Mi|
|00001ca0| 73 73 65 64 41 45 4b 65 | 79 77 6f 72 64 28 41 70 |ssedAEKe|yword(Ap|
|00001cb0| 70 6c 65 45 76 65 6e 74 | 20 2a 74 68 65 41 70 70 |pleEvent| *theApp|
|00001cc0| 6c 65 45 76 65 6e 74 29 | 3b 0d 2f 2a 20 73 6f 6d |leEvent)|;./* som|
|00001cd0| 65 20 57 4e 45 20 66 75 | 6e 63 74 69 6f 6e 73 20 |e WNE fu|nctions |
|00001ce0| 2a 2f 0d 76 6f 69 64 20 | 48 61 6e 64 6c 65 4d 6f |*/.void |HandleMo|
|00001cf0| 64 65 6c 65 73 73 44 69 | 61 6c 6f 67 28 76 6f 69 |delessDi|alog(voi|
|00001d00| 64 29 3b 0d 76 6f 69 64 | 20 53 65 74 45 76 65 6e |d);.void| SetEven|
|00001d10| 74 44 65 74 61 69 6c 73 | 28 76 6f 69 64 29 3b 0d |tDetails|(void);.|
|00001d20| 75 6e 73 69 67 6e 65 64 | 20 6c 6f 6e 67 20 47 65 |unsigned| long Ge|
|00001d30| 74 53 6c 65 65 70 28 76 | 6f 69 64 29 3b 0d 76 6f |tSleep(v|oid);.vo|
|00001d40| 69 64 20 42 6c 69 6e 6b | 54 65 78 74 43 75 72 73 |id Blink|TextCurs|
|00001d50| 6f 72 28 76 6f 69 64 29 | 3b 0d 76 6f 69 64 20 41 |or(void)|;.void A|
|00001d60| 64 6a 75 73 74 43 75 72 | 73 6f 72 28 50 6f 69 6e |djustCur|sor(Poin|
|00001d70| 74 20 6d 6f 75 73 65 2c | 20 52 67 6e 48 61 6e 64 |t mouse,| RgnHand|
|00001d80| 6c 65 20 72 65 67 69 6f | 6e 29 3b 0d 42 6f 6f 6c |le regio|n);.Bool|
|00001d90| 65 61 6e 09 49 73 4d 75 | 6c 74 69 43 75 72 73 6f |ean.IsMu|ltiCurso|
|00001da0| 72 57 69 6e 64 6f 77 28 | 57 69 6e 64 6f 77 44 61 |rWindow(|WindowDa|
|00001db0| 74 61 50 74 72 20 77 64 | 50 74 72 29 3b 0d 76 6f |taPtr wd|Ptr);.vo|
|00001dc0| 69 64 20 53 65 74 57 61 | 74 63 68 43 75 72 73 6f |id SetWa|tchCurso|
|00001dd0| 72 28 76 6f 69 64 29 3b | 0d 2f 2a 20 73 75 70 70 |r(void);|./* supp|
|00001de0| 6f 72 74 20 66 75 6e 63 | 74 69 6f 6e 73 20 2a 2f |ort func|tions */|
|00001df0| 0d 42 6f 6f 6c 65 61 6e | 20 53 79 73 74 65 6d 37 |.Boolean| System7|
|00001e00| 41 76 61 69 6c 61 62 6c | 65 28 76 6f 69 64 29 3b |Availabl|e(void);|
|00001e10| 0d 42 6f 6f 6c 65 61 6e | 20 54 72 61 70 41 76 61 |.Boolean| TrapAva|
|00001e20| 69 6c 61 62 6c 65 28 73 | 68 6f 72 74 20 74 68 65 |ilable(s|hort the|
|00001e30| 54 72 61 70 29 3b 0d 54 | 72 61 70 54 79 70 65 20 |Trap);.T|rapType |
|00001e40| 47 65 74 54 72 61 70 54 | 79 70 65 28 73 68 6f 72 |GetTrapT|ype(shor|
|00001e50| 74 20 74 68 65 54 72 61 | 70 29 3b 0d 73 68 6f 72 |t theTra|p);.shor|
|00001e60| 74 20 4e 75 6d 54 6f 6f | 6c 62 6f 78 54 72 61 70 |t NumToo|lboxTrap|
|00001e70| 73 28 76 6f 69 64 29 3b | 0d 76 6f 69 64 20 41 45 |s(void);|.void AE|
|00001e80| 49 6e 73 74 61 6c 6c 45 | 76 65 6e 74 48 61 6e 64 |InstallE|ventHand|
|00001e90| 6c 65 72 73 28 76 6f 69 | 64 29 3b 0d 76 6f 69 64 |lers(voi|d);.void|
|00001ea0| 20 53 65 65 49 66 44 41 | 49 73 46 72 6f 6e 74 57 | SeeIfDA|IsFrontW|
|00001eb0| 69 6e 64 6f 77 28 76 6f | 69 64 29 3b 0d 2f 2a 2a |indow(vo|id);./**|
|00001ec0| 2a 2a 2a 2a 2a 2a 2a 20 | 66 6f 72 20 63 6f 6e 63 |******* |for conc|
|00001ed0| 75 72 72 65 6e 74 20 6d | 6f 64 65 20 44 72 61 67 |urrent m|ode Drag|
|00001ee0| 5f 6f 6e 20 4d 6f 64 75 | 6c 65 20 28 69 65 20 68 |_on Modu|le (ie h|
|00001ef0| 41 57 4b 29 2c 20 68 61 | 6e 64 6c 65 20 61 20 73 |AWK), ha|ndle a s|
|00001f00| 69 6e 67 6c 65 20 65 76 | 65 6e 74 2e 20 2a 2f 0d |ingle ev|ent. */.|
|00001f10| 76 6f 69 64 20 48 61 6e | 64 6c 65 4f 6e 65 45 76 |void Han|dleOneEv|
|00001f20| 65 6e 74 28 76 6f 69 64 | 29 3b 0d 2f 2f 20 43 6f |ent(void|);.// Co|
|00001f30| 6d 6d 61 6e 64 20 6c 69 | 6e 65 20 66 72 6f 6d 20 |mmand li|ne from |
|00001f40| 73 63 72 61 70 0d 42 6f | 6f 6c 65 61 6e 20 46 69 |scrap.Bo|olean Fi|
|00001f50| 72 65 4f 66 66 48 61 77 | 6b 50 72 6f 67 72 61 6d |reOffHaw|kProgram|
|00001f60| 28 76 6f 69 64 29 3b 0d | 63 68 61 72 20 2a 47 65 |(void);.|char *Ge|
|00001f70| 74 43 6f 6d 6d 61 6e 64 | 4c 69 6e 65 46 72 6f 6d |tCommand|LineFrom|
|00001f80| 53 63 72 61 70 28 76 6f | 69 64 29 3b 0d 42 6f 6f |Scrap(vo|id);.Boo|
|00001f90| 6c 65 61 6e 20 47 65 6e | 65 72 69 63 47 65 74 4e |lean Gen|ericGetN|
|00001fa0| 61 6d 65 28 50 74 72 20 | 2a 70 6f 73 50 74 72 50 |ame(Ptr |*posPtrP|
|00001fb0| 74 72 2c 20 50 74 72 20 | 65 6f 66 50 74 72 2c 20 |tr, Ptr |eofPtr, |
|00001fc0| 50 74 72 20 70 61 74 50 | 74 72 2c 20 73 68 6f 72 |Ptr patP|tr, shor|
|00001fd0| 74 20 2a 70 61 74 4c 65 | 6e 50 29 3b 0d 76 6f 69 |t *patLe|nP);.voi|
|00001fe0| 64 20 54 65 6c 6c 48 41 | 57 4b 74 6f 51 75 69 74 |d TellHA|WKtoQuit|
|00001ff0| 28 76 6f 69 64 29 3b 0d | 0d 2f 2a 20 49 6e 69 74 |(void);.|./* Init|
|00002000| 2c 20 61 6e 64 20 74 68 | 65 20 6d 61 69 6e 20 65 |, and th|e main e|
|00002010| 76 65 6e 74 20 6c 6f 6f | 70 2e 20 4e 6f 74 65 20 |vent loo|p. Note |
|00002020| 74 68 65 72 65 20 69 73 | 20 61 20 22 6f 6e 65 2d |there is| a "one-|
|00002030| 73 68 6f 74 22 20 65 76 | 65 6e 74 20 6c 6f 6f 70 |shot" ev|ent loop|
|00002040| 0d 61 74 20 74 68 65 20 | 62 6f 74 74 6f 6d 20 6f |.at the |bottom o|
|00002050| 66 20 74 68 69 73 20 66 | 69 6c 65 2c 20 63 61 6c |f this f|ile, cal|
|00002060| 6c 65 64 20 62 79 20 68 | 41 57 4b 20 64 75 72 69 |led by h|AWK duri|
|00002070| 6e 67 20 63 6f 6e 63 75 | 72 72 65 6e 74 20 65 78 |ng concu|rrent ex|
|00002080| 65 63 75 74 69 6f 6e 2e | 0d 2a 2f 0d 73 68 6f 72 |ecution.|.*/.shor|
|00002090| 74 20 6d 61 69 6e 28 29 | 0d 09 7b 0d 09 57 69 6e |t main()|..{..Win|
|000020a0| 64 6f 77 50 74 72 09 09 | 77 68 69 63 68 57 69 6e |dowPtr..|whichWin|
|000020b0| 64 6f 77 3b 0d 09 50 6f | 69 6e 74 09 09 09 77 68 |dow;..Po|int...wh|
|000020c0| 65 72 65 3b 0d 09 73 68 | 6f 72 74 09 09 09 70 61 |ere;..sh|ort...pa|
|000020d0| 72 74 2c 20 61 70 70 56 | 52 65 66 4e 75 6d 3b 0d |rt, appV|RefNum;.|
|000020e0| 09 42 6f 6f 6c 65 61 6e | 09 09 09 67 6f 74 45 76 |.Boolean|...gotEv|
|000020f0| 65 6e 74 3b 0d 09 0d 09 | 44 6f 53 74 61 6e 64 61 |ent;....|DoStanda|
|00002100| 72 64 49 6e 69 74 73 28 | 29 3b 0d 09 4d 61 6b 65 |rdInits(|);..Make|
|00002110| 4d 65 6e 75 73 28 29 3b | 0d 09 49 42 65 61 6d 20 |Menus();|..IBeam |
|00002120| 3d 20 47 65 74 43 75 72 | 73 6f 72 28 69 42 65 61 |= GetCur|sor(iBea|
|00002130| 6d 43 75 72 73 6f 72 29 | 3b 0d 09 57 61 74 63 68 |mCursor)|;..Watch|
|00002140| 20 3d 20 47 65 74 43 75 | 72 73 6f 72 28 77 61 74 | = GetCu|rsor(wat|
|00002150| 63 68 43 75 72 73 6f 72 | 29 3b 0d 09 69 66 20 28 |chCursor|);..if (|
|00002160| 21 53 79 73 74 65 6d 37 | 41 76 61 69 6c 61 62 6c |!System7|Availabl|
|00002170| 65 28 29 29 0d 09 09 7b | 0d 09 09 53 79 73 42 65 |e())...{|...SysBe|
|00002180| 65 70 28 32 29 3b 0d 09 | 09 53 79 73 42 65 65 70 |ep(2);..|.SysBeep|
|00002190| 28 30 29 3b 0d 09 09 53 | 79 73 42 65 65 70 28 32 |(0);...S|ysBeep(2|
|000021a0| 29 3b 0d 09 09 45 78 69 | 74 54 6f 53 68 65 6c 6c |);...Exi|tToShell|
|000021b0| 28 29 3b 0d 09 09 7d 0d | 09 41 45 49 6e 73 74 61 |();...}.|.AEInsta|
|000021c0| 6c 6c 45 76 65 6e 74 48 | 61 6e 64 6c 65 72 73 28 |llEventH|andlers(|
|000021d0| 29 3b 0d 09 2f 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |);../***|********|
|000021e0| 2a 2a 20 53 65 74 20 75 | 70 20 74 6f 20 63 61 6c |** Set u|p to cal|
|000021f0| 6c 20 44 72 61 67 5f 6f | 6e 73 20 2a 2f 0d 09 69 |l Drag_o|ns */..i|
|00002200| 66 20 28 47 65 74 56 6f | 6c 28 4e 55 4c 4c 2c 20 |f (GetVo|l(NULL, |
|00002210| 26 61 70 70 56 52 65 66 | 4e 75 6d 29 29 0d 09 09 |&appVRef|Num))...|
|00002220| 61 70 70 56 52 65 66 4e | 75 6d 20 3d 20 30 3b 0d |appVRefN|um = 0;.|
|00002230| 09 49 6e 69 74 43 61 6c | 6c 52 65 73 6f 75 72 63 |.InitCal|lResourc|
|00002240| 65 73 28 61 70 70 56 52 | 65 66 4e 75 6d 2c 20 28 |es(appVR|efNum, (|
|00002250| 50 74 72 29 22 5c 70 44 | 72 61 67 5f 6f 6e 20 4d |Ptr)"\pD|rag_on M|
|00002260| 6f 64 75 6c 65 73 22 2c | 20 45 44 49 54 49 44 29 |odules",| EDITID)|
|00002270| 3b 0d 09 0d 09 63 75 72 | 73 6f 72 52 67 6e 20 3d |;....cur|sorRgn =|
|00002280| 20 4e 65 77 52 67 6e 28 | 29 3b 09 09 2f 2a 20 77 | NewRgn(|);../* w|
|00002290| 65 d5 6c 6c 20 70 61 73 | 73 20 57 4e 45 20 61 6e |e.ll pas|s WNE an|
|000022a0| 20 65 6d 70 74 79 20 72 | 65 67 69 6f 6e 20 74 68 | empty r|egion th|
|000022b0| 65 20 31 73 74 20 74 69 | 6d 65 20 74 68 72 75 20 |e 1st ti|me thru |
|000022c0| 2a 2f 0d 09 61 72 72 6f | 77 52 67 6e 20 3d 20 4e |*/..arro|wRgn = N|
|000022d0| 65 77 52 67 6e 28 29 3b | 0d 09 69 42 65 61 6d 52 |ewRgn();|..iBeamR|
|000022e0| 67 6e 20 3d 20 4e 65 77 | 52 67 6e 28 29 3b 0d 09 |gn = New|Rgn();..|
|000022f0| 0d 09 2f 2f 20 4a 75 6e | 65 20 39 36 2c 20 72 75 |..// Jun|e 96, ru|
|00002300| 6e 20 68 41 57 4b 20 69 | 66 20 63 6f 6d 6d 61 6e |n hAWK i|f comman|
|00002310| 64 20 6c 69 6e 65 20 69 | 73 20 6f 6e 20 63 6c 69 |d line i|s on cli|
|00002320| 70 20 2d 2d 20 77 65 20 | 77 69 6c 6c 20 71 75 69 |p -- we |will qui|
|00002330| 74 20 61 66 74 65 72 0d | 09 2f 2f 20 68 41 57 4b |t after.|.// hAWK|
|00002340| 20 70 72 6f 67 72 61 6d | 20 69 73 20 64 6f 6e 65 | program| is done|
|00002350| 20 69 6e 20 74 68 69 73 | 20 63 61 73 65 0d 09 2f | in this| case../|
|00002360| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 20 2a 2f |********|***** */|
|00002370| 0d 09 69 66 20 28 46 69 | 72 65 4f 66 66 48 61 77 |..if (Fi|reOffHaw|
|00002380| 6b 50 72 6f 67 72 61 6d | 28 29 29 0d 09 09 7b 0d |kProgram|())...{.|
|00002390| 09 09 2f 2a 2a 2a 2a 2a | 2a 20 52 65 6d 6f 76 65 |../*****|* Remove|
|000023a0| 20 6e 6f 74 69 63 65 20 | 69 66 20 68 41 57 4b 20 | notice |if hAWK |
|000023b0| 66 69 6e 69 73 68 65 64 | 20 77 68 69 6c 65 20 4d |finished| while M|
|000023c0| 69 6e 69 6d 61 6c 20 41 | 70 70 20 77 61 73 0d 09 |inimal A|pp was..|
|000023d0| 09 69 6e 20 74 68 65 20 | 62 61 63 6b 67 72 6f 75 |.in the |backgrou|
|000023e0| 6e 64 2e 20 4e 6f 74 65 | 20 74 68 61 74 20 61 74 |nd. Note| that at|
|000023f0| 20 70 72 65 73 65 6e 74 | 20 68 41 57 4b 20 77 69 | present| hAWK wi|
|00002400| 6c 6c 20 6e 6f 74 20 6e | 6f 74 69 66 79 0d 09 09 |ll not n|otify...|
|00002410| 75 73 20 69 66 20 69 74 | 20 69 73 20 72 75 6e 20 |us if it| is run |
|00002420| 66 72 6f 6d 20 61 20 63 | 6f 6d 6d 61 6e 64 20 6c |from a c|ommand l|
|00002430| 69 6e 65 20 28 73 65 65 | 20 43 61 6c 6c 52 65 73 |ine (see| CallRes|
|00002440| 6f 75 72 63 65 28 29 29 | 2e 2a 2f 0d 09 09 69 66 |ource())|.*/...if|
|00002450| 20 28 67 4e 6f 74 69 66 | 79 69 6e 67 29 0d 09 09 | (gNotif|ying)...|
|00002460| 09 7b 0d 09 09 09 4e 4d | 52 65 6d 6f 76 65 28 26 |.{....NM|Remove(&|
|00002470| 67 4e 6f 74 69 66 79 52 | 65 63 29 3b 0d 09 09 09 |gNotifyR|ec);....|
|00002480| 69 66 20 28 67 4e 6f 74 | 69 66 79 52 65 63 2e 6e |if (gNot|ifyRec.n|
|00002490| 6d 49 63 6f 6e 29 0d 09 | 09 09 09 52 65 6c 65 61 |mIcon)..|...Relea|
|000024a0| 73 65 52 65 73 6f 75 72 | 63 65 28 67 4e 6f 74 69 |seResour|ce(gNoti|
|000024b0| 66 79 52 65 63 2e 6e 6d | 49 63 6f 6e 29 3b 0d 09 |fyRec.nm|Icon);..|
|000024c0| 09 09 67 4e 6f 74 69 66 | 79 69 6e 67 20 3d 20 46 |..gNotif|ying = F|
|000024d0| 41 4c 53 45 3b 0d 09 09 | 09 2f 2a 20 53 68 6f 77 |ALSE;...|./* Show|
|000024e0| 52 65 73 75 6c 74 73 41 | 66 74 65 72 4e 6f 74 69 |ResultsA|fterNoti|
|000024f0| 66 79 28 29 3b 20 2d 6e | 6f 74 20 69 6d 70 6c 65 |fy(); -n|ot imple|
|00002500| 6d 65 6e 74 65 64 20 2a | 2f 0d 09 09 09 7d 0d 09 |mented *|/....}..|
|00002510| 09 45 78 69 74 54 6f 53 | 68 65 6c 6c 28 29 3b 0d |.ExitToS|hell();.|
|00002520| 09 09 7d 0d 09 0d 09 64 | 6f 20 2f 2a 20 77 68 69 |..}....d|o /* whi|
|00002530| 6c 65 20 6e 6f 74 20 71 | 75 69 74 74 69 6e 67 20 |le not q|uitting |
|00002540| 2a 2f 0d 09 09 7b 0d 09 | 09 53 65 65 49 66 44 41 |*/...{..|.SeeIfDA|
|00002550| 49 73 46 72 6f 6e 74 57 | 69 6e 64 6f 77 28 29 3b |IsFrontW|indow();|
|00002560| 0d 09 09 69 66 20 28 67 | 49 6e 42 61 63 6b 67 72 |...if (g|InBackgr|
|00002570| 6f 75 6e 64 29 0d 09 09 | 09 7b 0d 09 09 09 2f 2a |ound)...|.{..../*|
|00002580| 20 68 61 6e 64 6c 65 20 | 62 65 69 6e 67 20 69 6e | handle |being in|
|00002590| 20 74 68 65 20 62 61 63 | 6b 67 72 6f 75 6e 64 20 | the bac|kground |
|000025a0| 2a 2f 0d 09 09 09 3b 0d | 09 09 09 7d 0d 09 09 0d |*/....;.|...}....|
|000025b0| 09 09 67 6f 74 45 76 65 | 6e 74 20 3d 20 57 61 69 |..gotEve|nt = Wai|
|000025c0| 74 4e 65 78 74 45 76 65 | 6e 74 28 65 76 65 72 79 |tNextEve|nt(every|
|000025d0| 45 76 65 6e 74 2c 20 26 | 67 45 76 74 44 65 74 61 |Event, &|gEvtDeta|
|000025e0| 69 6c 73 2e 65 76 65 6e | 74 2c 20 47 65 74 53 6c |ils.even|t, GetSl|
|000025f0| 65 65 70 28 29 2c 20 63 | 75 72 73 6f 72 52 67 6e |eep(), c|ursorRgn|
|00002600| 29 3b 0d 09 09 69 66 20 | 28 67 6f 74 45 76 65 6e |);...if |(gotEven|
|00002610| 74 29 0d 09 09 09 7b 0d | 09 09 09 53 65 74 45 76 |t)....{.|...SetEv|
|00002620| 65 6e 74 44 65 74 61 69 | 6c 73 28 29 3b 0d 09 09 |entDetai|ls();...|
|00002630| 09 0d 09 09 09 41 64 6a | 75 73 74 43 75 72 73 6f |.....Adj|ustCurso|
|00002640| 72 28 67 45 76 74 44 65 | 74 61 69 6c 73 2e 65 76 |r(gEvtDe|tails.ev|
|00002650| 65 6e 74 2e 77 68 65 72 | 65 2c 20 63 75 72 73 6f |ent.wher|e, curso|
|00002660| 72 52 67 6e 29 3b 0d 09 | 09 09 0d 09 09 09 69 66 |rRgn);..|......if|
|00002670| 20 28 49 73 44 69 61 6c | 6f 67 45 76 65 6e 74 28 | (IsDial|ogEvent(|
|00002680| 26 67 45 76 74 44 65 74 | 61 69 6c 73 2e 65 76 65 |&gEvtDet|ails.eve|
|00002690| 6e 74 29 29 0d 09 09 09 | 09 48 61 6e 64 6c 65 4d |nt))....|.HandleM|
|000026a0| 6f 64 65 6c 65 73 73 44 | 69 61 6c 6f 67 28 29 3b |odelessD|ialog();|
|000026b0| 20 2f 2a 20 6e 6f 74 20 | 69 6d 70 6c 65 6d 65 6e | /* not |implemen|
|000026c0| 74 65 64 20 2a 2f 0d 09 | 09 09 65 6c 73 65 0d 09 |ted */..|..else..|
|000026d0| 09 09 09 7b 0d 09 09 09 | 09 73 77 69 74 63 68 20 |...{....|.switch |
|000026e0| 28 67 45 76 74 44 65 74 | 61 69 6c 73 2e 65 76 65 |(gEvtDet|ails.eve|
|000026f0| 6e 74 2e 77 68 61 74 29 | 0d 09 09 09 09 09 7b 0d |nt.what)|......{.|
|00002700| 09 09 09 09 63 61 73 65 | 20 6d 6f 75 73 65 44 6f |....case| mouseDo|
|00002710| 77 6e 3a 0d 09 09 09 09 | 09 73 77 69 74 63 68 20 |wn:.....|.switch |
|00002720| 28 70 61 72 74 20 3d 20 | 46 69 6e 64 57 69 6e 64 |(part = |FindWind|
|00002730| 6f 77 28 67 45 76 74 44 | 65 74 61 69 6c 73 2e 65 |ow(gEvtD|etails.e|
|00002740| 76 65 6e 74 2e 77 68 65 | 72 65 2c 0d 09 09 09 09 |vent.whe|re,.....|
|00002750| 09 09 09 09 09 26 67 45 | 76 74 44 65 74 61 69 6c |.....&gE|vtDetail|
|00002760| 73 2e 6d 6f 75 73 65 44 | 6f 77 6e 57 69 6e 64 6f |s.mouseD|ownWindo|
|00002770| 77 29 29 20 0d 09 09 09 | 09 09 09 7b 0d 09 09 09 |w)) ....|...{....|
|00002780| 09 09 63 61 73 65 20 69 | 6e 44 65 73 6b 3a 20 0d |..case i|nDesk: .|
|00002790| 09 09 09 09 09 09 3b 0d | 09 09 09 09 09 62 72 65 |......;.|.....bre|
|000027a0| 61 6b 3b 0d 09 09 09 09 | 09 63 61 73 65 20 69 6e |ak;.....|.case in|
|000027b0| 4d 65 6e 75 42 61 72 3a | 0d 09 09 09 09 09 09 67 |MenuBar:|.......g|
|000027c0| 51 75 69 74 74 69 6e 67 | 20 3d 20 44 6f 4d 65 6e |Quitting| = DoMen|
|000027d0| 75 28 4d 65 6e 75 53 65 | 6c 65 63 74 28 67 45 76 |u(MenuSe|lect(gEv|
|000027e0| 74 44 65 74 61 69 6c 73 | 2e 65 76 65 6e 74 2e 77 |tDetails|.event.w|
|000027f0| 68 65 72 65 29 29 3b 0d | 09 09 09 09 09 63 61 73 |here));.|.....cas|
|00002800| 65 20 69 6e 53 79 73 57 | 69 6e 64 6f 77 3a 0d 09 |e inSysW|indow:..|
|00002810| 09 09 09 09 09 53 79 73 | 74 65 6d 43 6c 69 63 6b |.....Sys|temClick|
|00002820| 20 28 26 67 45 76 74 44 | 65 74 61 69 6c 73 2e 65 | (&gEvtD|etails.e|
|00002830| 76 65 6e 74 2c 20 67 45 | 76 74 44 65 74 61 69 6c |vent, gE|vtDetail|
|00002840| 73 2e 6d 6f 75 73 65 44 | 6f 77 6e 57 69 6e 64 6f |s.mouseD|ownWindo|
|00002850| 77 29 3b 0d 09 09 09 09 | 09 62 72 65 61 6b 3b 0d |w);.....|.break;.|
|00002860| 09 09 09 09 09 63 61 73 | 65 20 69 6e 44 72 61 67 |.....cas|e inDrag|
|00002870| 3a 0d 09 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |:......b|reak;...|
|00002880| 09 09 09 63 61 73 65 20 | 69 6e 5a 6f 6f 6d 49 6e |...case |inZoomIn|
|00002890| 3a 0d 09 09 09 09 09 63 | 61 73 65 20 69 6e 5a 6f |:......c|ase inZo|
|000028a0| 6f 6d 4f 75 74 3a 0d 09 | 09 09 09 09 62 72 65 61 |omOut:..|....brea|
|000028b0| 6b 3b 0d 09 09 09 09 09 | 63 61 73 65 20 69 6e 47 |k;......|case inG|
|000028c0| 72 6f 77 3a 0d 09 09 09 | 09 09 62 72 65 61 6b 3b |row:....|..break;|
|000028d0| 0d 09 09 09 09 09 63 61 | 73 65 20 69 6e 47 6f 41 |......ca|se inGoA|
|000028e0| 77 61 79 3a 0d 09 09 09 | 09 09 62 72 65 61 6b 3b |way:....|..break;|
|000028f0| 0d 09 09 09 09 09 63 61 | 73 65 20 69 6e 43 6f 6e |......ca|se inCon|
|00002900| 74 65 6e 74 3a 0d 09 09 | 09 09 09 62 72 65 61 6b |tent:...|...break|
|00002910| 3b 0d 09 09 09 09 09 64 | 65 66 61 75 6c 74 3a 20 |;......d|efault: |
|00002920| 0d 09 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |......br|eak;....|
|00002930| 09 09 09 7d 20 2f 2a 20 | 73 77 69 74 63 68 20 46 |...} /* |switch F|
|00002940| 69 6e 64 57 69 6e 64 6f | 77 20 2a 2f 0d 09 09 09 |indWindo|w */....|
|00002950| 09 62 72 65 61 6b 3b 0d | 09 09 09 09 63 61 73 65 |.break;.|....case|
|00002960| 20 6b 65 79 44 6f 77 6e | 3a 0d 09 09 09 09 63 61 | keyDown|:.....ca|
|00002970| 73 65 20 61 75 74 6f 4b | 65 79 3a 0d 09 09 09 09 |se autoK|ey:.....|
|00002980| 09 0d 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |......br|eak;....|
|00002990| 09 63 61 73 65 20 75 70 | 64 61 74 65 45 76 74 3a |.case up|dateEvt:|
|000029a0| 0d 09 09 09 09 09 0d 09 | 09 09 09 62 72 65 61 6b |........|...break|
|000029b0| 3b 0d 09 09 09 09 63 61 | 73 65 20 64 69 73 6b 45 |;.....ca|se diskE|
|000029c0| 76 74 3a 0d 09 09 09 09 | 09 69 66 20 28 48 69 57 |vt:.....|.if (HiW|
|000029d0| 6f 72 64 28 67 45 76 74 | 44 65 74 61 69 6c 73 2e |ord(gEvt|Details.|
|000029e0| 65 76 65 6e 74 2e 6d 65 | 73 73 61 67 65 29 20 21 |event.me|ssage) !|
|000029f0| 3d 20 6e 6f 45 72 72 29 | 0d 09 09 09 09 09 09 7b |= noErr)|.......{|
|00002a00| 0d 09 09 09 09 09 09 44 | 49 4c 6f 61 64 28 29 3b |.......D|ILoad();|
|00002a10| 0d 09 09 09 09 09 09 77 | 68 65 72 65 2e 68 20 3d |.......w|here.h =|
|00002a20| 20 77 68 65 72 65 2e 76 | 20 3d 20 38 35 3b 0d 09 | where.v| = 85;..|
|00002a30| 09 09 09 09 09 44 49 42 | 61 64 4d 6f 75 6e 74 28 |.....DIB|adMount(|
|00002a40| 77 68 65 72 65 2c 20 67 | 45 76 74 44 65 74 61 69 |where, g|EvtDetai|
|00002a50| 6c 73 2e 65 76 65 6e 74 | 2e 6d 65 73 73 61 67 65 |ls.event|.message|
|00002a60| 29 3b 0d 09 09 09 09 09 | 09 7d 0d 09 09 09 09 62 |);......|.}.....b|
|00002a70| 72 65 61 6b 3b 0d 09 09 | 09 09 63 61 73 65 20 61 |reak;...|..case a|
|00002a80| 63 74 69 76 61 74 65 45 | 76 74 3a 0d 09 09 09 09 |ctivateE|vt:.....|
|00002a90| 09 0d 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |......br|eak;....|
|00002aa0| 09 63 61 73 65 20 6b 4f | 53 45 76 65 6e 74 3a 0d |.case kO|SEvent:.|
|00002ab0| 09 09 09 09 09 73 77 69 | 74 63 68 28 28 67 45 76 |.....swi|tch((gEv|
|00002ac0| 74 44 65 74 61 69 6c 73 | 2e 65 76 65 6e 74 2e 6d |tDetails|.event.m|
|00002ad0| 65 73 73 61 67 65 20 3e | 3e 20 32 34 29 20 26 20 |essage >|> 24) & |
|00002ae0| 30 78 66 66 29 0d 09 09 | 09 09 09 09 7b 0d 09 09 |0xff)...|....{...|
|00002af0| 09 09 09 63 61 73 65 20 | 6d 6f 75 73 65 4d 6f 76 |...case |mouseMov|
|00002b00| 65 64 4d 65 73 73 61 67 | 65 3a 0d 09 09 09 09 09 |edMessag|e:......|
|00002b10| 09 42 6c 69 6e 6b 54 65 | 78 74 43 75 72 73 6f 72 |.BlinkTe|xtCursor|
|00002b20| 28 29 3b 0d 09 09 09 09 | 09 62 72 65 61 6b 3b 0d |();.....|.break;.|
|00002b30| 09 09 09 09 09 63 61 73 | 65 20 73 75 73 70 65 6e |.....cas|e suspen|
|00002b40| 64 52 65 73 75 6d 65 4d | 65 73 73 61 67 65 3a 0d |dResumeM|essage:.|
|00002b50| 09 09 09 09 09 09 2f 2a | 20 4e 4f 54 20 48 45 52 |....../*| NOT HER|
|00002b60| 45 20 69 66 20 6d 6f 64 | 65 6c 65 73 73 20 69 6e |E if mod|eless in|
|00002b70| 20 66 72 6f 6e 74 20 2a | 2f 0d 09 09 09 09 09 09 | front *|/.......|
|00002b80| 67 49 6e 42 61 63 6b 67 | 72 6f 75 6e 64 20 3d 20 |gInBackg|round = |
|00002b90| 28 28 67 45 76 74 44 65 | 74 61 69 6c 73 2e 65 76 |((gEvtDe|tails.ev|
|00002ba0| 65 6e 74 2e 6d 65 73 73 | 61 67 65 20 26 20 72 65 |ent.mess|age & re|
|00002bb0| 73 75 6d 65 46 6c 61 67 | 29 20 3d 3d 20 30 29 3b |sumeFlag|) == 0);|
|00002bc0| 0d 09 09 09 09 09 09 2f | 2a 2a 2a 2a 2a 2a 20 52 |......./|****** R|
|00002bd0| 65 6d 6f 76 65 20 6e 6f | 74 69 63 65 20 69 66 20 |emove no|tice if |
|00002be0| 68 41 57 4b 20 66 69 6e | 69 73 68 65 64 20 77 68 |hAWK fin|ished wh|
|00002bf0| 69 6c 65 20 4d 69 6e 69 | 6d 61 6c 20 41 70 70 20 |ile Mini|mal App |
|00002c00| 77 61 73 0d 09 09 09 09 | 09 09 69 6e 20 74 68 65 |was.....|..in the|
|00002c10| 20 62 61 63 6b 67 72 6f | 75 6e 64 2e 20 2a 2f 0d | backgro|und. */.|
|00002c20| 09 09 09 09 09 09 69 66 | 20 28 67 4e 6f 74 69 66 |......if| (gNotif|
|00002c30| 79 69 6e 67 29 0d 09 09 | 09 09 09 09 09 7b 0d 09 |ying)...|.....{..|
|00002c40| 09 09 09 09 09 09 4e 4d | 52 65 6d 6f 76 65 28 26 |......NM|Remove(&|
|00002c50| 67 4e 6f 74 69 66 79 52 | 65 63 29 3b 0d 09 09 09 |gNotifyR|ec);....|
|00002c60| 09 09 09 09 69 66 20 28 | 67 4e 6f 74 69 66 79 52 |....if (|gNotifyR|
|00002c70| 65 63 2e 6e 6d 49 63 6f | 6e 29 0d 09 09 09 09 09 |ec.nmIco|n)......|
|00002c80| 09 09 09 52 65 6c 65 61 | 73 65 52 65 73 6f 75 72 |...Relea|seResour|
|00002c90| 63 65 28 67 4e 6f 74 69 | 66 79 52 65 63 2e 6e 6d |ce(gNoti|fyRec.nm|
|00002ca0| 49 63 6f 6e 29 3b 0d 09 | 09 09 09 09 09 09 67 4e |Icon);..|......gN|
|00002cb0| 6f 74 69 66 79 69 6e 67 | 20 3d 20 46 41 4c 53 45 |otifying| = FALSE|
|00002cc0| 3b 0d 09 09 09 09 09 09 | 09 2f 2a 20 53 68 6f 77 |;.......|./* Show|
|00002cd0| 52 65 73 75 6c 74 73 41 | 66 74 65 72 4e 6f 74 69 |ResultsA|fterNoti|
|00002ce0| 66 79 28 29 3b 20 2d 6e | 6f 74 20 69 6d 70 6c 65 |fy(); -n|ot imple|
|00002cf0| 6d 65 6e 74 65 64 20 2a | 2f 0d 09 09 09 09 09 09 |mented *|/.......|
|00002d00| 09 7d 0d 09 09 09 09 09 | 62 72 65 61 6b 3b 0d 09 |.}......|break;..|
|00002d10| 09 09 09 09 09 7d 20 2f | 2a 20 73 77 69 74 63 68 |.....} /|* switch|
|00002d20| 20 6d 65 73 73 61 67 65 | 20 2a 2f 0d 09 09 09 09 | message| */.....|
|00002d30| 62 72 65 61 6b 3b 0d 09 | 09 09 09 63 61 73 65 20 |break;..|...case |
|00002d40| 6b 48 69 67 68 4c 65 76 | 65 6c 45 76 65 6e 74 3a |kHighLev|elEvent:|
|00002d50| 0d 09 09 09 09 09 41 45 | 50 72 6f 63 65 73 73 41 |......AE|ProcessA|
|00002d60| 70 70 6c 65 45 76 65 6e | 74 28 26 67 45 76 74 44 |ppleEven|t(&gEvtD|
|00002d70| 65 74 61 69 6c 73 2e 65 | 76 65 6e 74 29 3b 0d 09 |etails.e|vent);..|
|00002d80| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 09 09 09 7d |...break|;......}|
|00002d90| 20 2f 2a 20 73 77 69 74 | 63 68 20 77 68 61 74 20 | /* swit|ch what |
|00002da0| 2a 2f 0d 09 09 09 09 7d | 20 2f 2a 20 6e 6f 74 20 |*/.....}| /* not |
|00002db0| 6d 6f 64 65 6c 65 73 73 | 20 64 69 61 6c 6f 67 20 |modeless| dialog |
|00002dc0| 2a 2f 0d 09 09 09 7d 20 | 2f 2a 20 69 66 20 67 6f |*/....} |/* if go|
|00002dd0| 74 20 65 76 65 6e 74 20 | 2a 2f 0d 09 09 65 6c 73 |t event |*/...els|
|00002de0| 65 0d 09 09 09 42 6c 69 | 6e 6b 54 65 78 74 43 75 |e....Bli|nkTextCu|
|00002df0| 72 73 6f 72 28 29 3b 0d | 09 09 41 64 6a 75 73 74 |rsor();.|..Adjust|
|00002e00| 43 75 72 73 6f 72 28 67 | 45 76 74 44 65 74 61 69 |Cursor(g|EvtDetai|
|00002e10| 6c 73 2e 65 76 65 6e 74 | 2e 77 68 65 72 65 2c 20 |ls.event|.where, |
|00002e20| 63 75 72 73 6f 72 52 67 | 6e 29 3b 0d 09 09 7d 20 |cursorRg|n);...} |
|00002e30| 77 68 69 6c 65 20 28 21 | 67 51 75 69 74 74 69 6e |while (!|gQuittin|
|00002e40| 67 29 3b 0d 09 7d 20 2f | 2a 20 65 6e 64 20 6d 61 |g);..} /|* end ma|
|00002e50| 69 6e 28 29 20 2a 2f 0d | 0d 2f 2a 20 56 65 72 79 |in() */.|./* Very|
|00002e60| 20 72 6f 75 74 69 6e 65 | 20 73 74 75 66 66 2c 20 | routine| stuff, |
|00002e70| 74 68 6f 75 67 68 20 6e | 6f 74 65 20 74 68 65 20 |though n|ote the |
|00002e80| 73 74 61 63 6b 20 69 73 | 20 65 6e 6c 61 72 67 65 |stack is| enlarge|
|00002e90| 64 20 2d 20 68 41 57 4b | 20 6e 65 65 64 73 0d 61 |d - hAWK| needs.a|
|00002ea0| 20 6c 6f 74 20 6f 66 20 | 73 74 61 63 6b 2e 20 2a | lot of |stack. *|
|00002eb0| 2f 0d 76 6f 69 64 09 09 | 44 6f 53 74 61 6e 64 61 |/.void..|DoStanda|
|00002ec0| 72 64 49 6e 69 74 73 28 | 29 0d 09 7b 0d 09 73 68 |rdInits(|)..{..sh|
|00002ed0| 6f 72 74 09 69 3b 0d 09 | 45 76 65 6e 74 52 65 63 |ort.i;..|EventRec|
|00002ee0| 6f 72 64 09 65 76 65 6e | 74 3b 0d 09 0d 09 2f 2a |ord.even|t;..../*|
|00002ef0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002f00| 2a 2a 2a 2a 20 41 64 6a | 75 73 74 20 73 74 61 63 |**** Adj|ust stac|
|00002f10| 6b 0d 09 2d 20 6e 6f 74 | 65 20 6c 6f 6e 67 20 53 |k..- not|e long S|
|00002f20| 74 61 63 6b 53 70 61 63 | 65 28 29 20 72 65 74 75 |tackSpac|e() retu|
|00002f30| 72 6e 73 20 63 75 72 72 | 65 6e 74 20 72 6f 6f 6d |rns curr|ent room|
|00002f40| 20 6c 65 66 74 20 6f 6e | 20 73 74 61 63 6b 0d 09 | left on| stack..|
|00002f50| 61 74 20 61 6e 79 20 74 | 69 6d 65 2c 20 69 66 20 |at any t|ime, if |
|00002f60| 74 68 65 72 65 20 69 73 | 20 66 75 74 75 72 65 20 |there is| future |
|00002f70| 74 72 6f 75 62 6c 65 2e | 2e 2e 2a 2f 0d 09 53 65 |trouble.|..*/..Se|
|00002f80| 74 41 70 70 6c 4c 69 6d | 69 74 28 47 65 74 41 70 |tApplLim|it(GetAp|
|00002f90| 70 6c 4c 69 6d 69 74 28 | 29 20 2d 20 35 37 33 34 |plLimit(|) - 5734|
|00002fa0| 34 29 3b 0d 09 4d 61 78 | 41 70 70 6c 5a 6f 6e 65 |4);..Max|ApplZone|
|00002fb0| 28 29 3b 0d 09 66 6f 72 | 20 28 69 20 3d 20 30 3b |();..for| (i = 0;|
|00002fc0| 20 69 20 3c 20 31 38 3b | 20 2b 2b 69 29 0d 09 09 | i < 18;| ++i)...|
|00002fd0| 4d 6f 72 65 4d 61 73 74 | 65 72 73 28 29 3b 0d 09 |MoreMast|ers();..|
|00002fe0| 49 6e 69 74 47 72 61 66 | 28 26 71 64 2e 74 68 65 |InitGraf|(&qd.the|
|00002ff0| 50 6f 72 74 29 3b 0d 09 | 49 6e 69 74 46 6f 6e 74 |Port);..|InitFont|
|00003000| 73 28 29 3b 0d 09 46 6c | 75 73 68 45 76 65 6e 74 |s();..Fl|ushEvent|
|00003010| 73 28 65 76 65 72 79 45 | 76 65 6e 74 2c 20 30 29 |s(everyE|vent, 0)|
|00003020| 3b 0d 09 49 6e 69 74 57 | 69 6e 64 6f 77 73 28 29 |;..InitW|indows()|
|00003030| 3b 0d 09 49 6e 69 74 4d | 65 6e 75 73 28 29 3b 0d |;..InitM|enus();.|
|00003040| 09 54 45 49 6e 69 74 28 | 29 3b 0d 09 49 6e 69 74 |.TEInit(|);..Init|
|00003050| 44 69 61 6c 6f 67 73 28 | 30 4c 29 3b 0d 09 49 6e |Dialogs(|0L);..In|
|00003060| 69 74 43 75 72 73 6f 72 | 28 29 3b 0d 09 66 6f 72 |itCursor|();..for|
|00003070| 20 28 69 20 3d 20 30 3b | 20 69 20 3c 20 33 3b 20 | (i = 0;| i < 3; |
|00003080| 2b 2b 69 29 0d 09 09 45 | 76 65 6e 74 41 76 61 69 |++i)...E|ventAvai|
|00003090| 6c 28 65 76 65 72 79 45 | 76 65 6e 74 2c 20 26 65 |l(everyE|vent, &e|
|000030a0| 76 65 6e 74 29 3b 0d 09 | 7d 2f 2a 20 65 6e 64 20 |vent);..|}/* end |
|000030b0| 44 6f 53 74 61 6e 64 61 | 72 64 49 6e 69 74 73 28 |DoStanda|rdInits(|
|000030c0| 29 20 2a 2f 0d 0d 76 6f | 69 64 09 09 4d 61 6b 65 |) */..vo|id..Make|
|000030d0| 4d 65 6e 75 73 28 29 0d | 09 7b 0d 0d 09 61 70 70 |Menus().|.{...app|
|000030e0| 6c 65 4d 65 6e 75 20 3d | 20 4e 65 77 4d 65 6e 75 |leMenu =| NewMenu|
|000030f0| 28 41 50 50 4c 45 49 44 | 2c 28 53 74 72 69 6e 67 |(APPLEID|,(String|
|00003100| 50 74 72 29 22 5c 70 5c | 32 34 22 29 3b 09 0d 09 |Ptr)"\p\|24");...|
|00003110| 41 70 70 65 6e 64 4d 65 | 6e 75 28 61 70 70 6c 65 |AppendMe|nu(apple|
|00003120| 4d 65 6e 75 2c 28 53 74 | 72 69 6e 67 50 74 72 29 |Menu,(St|ringPtr)|
|00003130| 22 5c 70 28 41 62 6f 75 | 74 20 6e 6f 74 68 69 6e |"\p(Abou|t nothin|
|00003140| 67 2e 2e 2e 3b 28 2d 22 | 29 3b 0d 09 41 64 64 52 |g...;(-"|);..AddR|
|00003150| 65 73 4d 65 6e 75 28 61 | 70 70 6c 65 4d 65 6e 75 |esMenu(a|ppleMenu|
|00003160| 2c 27 44 52 56 52 27 29 | 3b 0d 09 49 6e 73 65 72 |,'DRVR')|;..Inser|
|00003170| 74 4d 65 6e 75 28 61 70 | 70 6c 65 4d 65 6e 75 2c |tMenu(ap|pleMenu,|
|00003180| 30 29 3b 0d 0d 09 66 69 | 6c 65 4d 65 6e 75 20 3d |0);...fi|leMenu =|
|00003190| 20 4e 65 77 4d 65 6e 75 | 28 46 49 4c 45 49 44 2c | NewMenu|(FILEID,|
|000031a0| 28 53 74 72 69 6e 67 50 | 74 72 29 22 5c 70 46 69 |(StringP|tr)"\pFi|
|000031b0| 6c 65 22 29 3b 0d 09 41 | 70 70 65 6e 64 4d 65 6e |le");..A|ppendMen|
|000031c0| 75 28 66 69 6c 65 4d 65 | 6e 75 2c 28 53 74 72 69 |u(fileMe|nu,(Stri|
|000031d0| 6e 67 50 74 72 29 22 5c | 70 4e 65 77 3b 4f 70 65 |ngPtr)"\|pNew;Ope|
|000031e0| 6e 2e 2e 2e 3b 28 2d 3b | 43 6c 6f 73 65 3b 53 61 |n...;(-;|Close;Sa|
|000031f0| 76 65 3b 53 61 76 65 20 | 61 73 2e 2e 2e 3b 52 65 |ve;Save |as...;Re|
|00003200| 76 65 72 74 3b 28 2d 3b | 50 61 67 65 20 53 65 74 |vert;(-;|Page Set|
|00003210| 75 70 2e 2e 2e 3b 50 72 | 69 6e 74 2e 2e 2e 3b 28 |up...;Pr|int...;(|
|00003220| 2d 3b 51 75 69 74 2f 51 | 22 29 3b 0d 09 49 6e 73 |-;Quit/Q|");..Ins|
|00003230| 65 72 74 4d 65 6e 75 28 | 66 69 6c 65 4d 65 6e 75 |ertMenu(|fileMenu|
|00003240| 2c 30 29 3b 09 0d 0d 09 | 65 64 69 74 4d 65 6e 75 |,0);....|editMenu|
|00003250| 20 3d 20 4e 65 77 4d 65 | 6e 75 28 45 44 49 54 49 | = NewMe|nu(EDITI|
|00003260| 44 2c 28 53 74 72 69 6e | 67 50 74 72 29 22 5c 70 |D,(Strin|gPtr)"\p|
|00003270| 45 64 69 74 22 29 3b 0d | 09 41 70 70 65 6e 64 4d |Edit");.|.AppendM|
|00003280| 65 6e 75 28 65 64 69 74 | 4d 65 6e 75 2c 28 53 74 |enu(edit|Menu,(St|
|00003290| 72 69 6e 67 50 74 72 29 | 22 5c 70 55 6e 64 6f 2f |ringPtr)|"\pUndo/|
|000032a0| 5a 3b 28 2d 3b 43 75 74 | 2f 58 3b 43 6f 70 79 2f |Z;(-;Cut|/X;Copy/|
|000032b0| 43 3b 50 61 73 74 65 2f | 56 3b 43 6c 65 61 72 22 |C;Paste/|V;Clear"|
|000032c0| 29 3b 0d 09 49 6e 73 65 | 72 74 4d 65 6e 75 28 65 |);..Inse|rtMenu(e|
|000032d0| 64 69 74 4d 65 6e 75 2c | 30 29 3b 0d 0d 09 44 72 |ditMenu,|0);...Dr|
|000032e0| 61 77 4d 65 6e 75 42 61 | 72 28 29 3b 0d 0d 09 7d |awMenuBa|r();...}|
|000032f0| 20 2f 2a 20 65 6e 64 20 | 4d 61 6b 65 4d 65 6e 75 | /* end |MakeMenu|
|00003300| 73 28 29 20 2a 2f 0d 0d | 2f 2a 20 44 6f 4d 65 6e |s() */..|/* DoMen|
|00003310| 75 20 72 65 74 75 72 6e | 73 20 54 52 55 45 20 77 |u return|s TRUE w|
|00003320| 68 65 6e 20 71 75 69 74 | 20 73 65 6c 65 63 74 65 |hen quit| selecte|
|00003330| 64 2e 20 49 66 20 68 41 | 57 4b 20 69 73 20 72 75 |d. If hA|WK is ru|
|00003340| 6e 6e 69 6e 67 2c 20 77 | 65 20 66 6f 72 63 65 20 |nning, w|e force |
|00003350| 69 74 0d 74 6f 20 71 75 | 69 74 20 61 6c 73 6f 20 |it.to qu|it also |
|00003360| 77 69 74 68 20 61 20 63 | 6f 6d 6d 61 6e 64 2d 70 |with a c|ommand-p|
|00003370| 65 72 69 6f 64 2e 20 2a | 2f 0d 42 6f 6f 6c 65 61 |eriod. *|/.Boolea|
|00003380| 6e 09 09 44 6f 4d 65 6e | 75 28 6d 65 6e 75 41 6e |n..DoMen|u(menuAn|
|00003390| 64 49 74 65 6d 29 0d 6c | 6f 6e 67 09 09 6d 65 6e |dItem).l|ong..men|
|000033a0| 75 41 6e 64 49 74 65 6d | 3b 0d 09 7b 0d 09 73 68 |uAndItem|;..{..sh|
|000033b0| 6f 72 74 09 74 68 65 49 | 74 65 6d 3b 0d 09 63 68 |ort.theI|tem;..ch|
|000033c0| 61 72 09 6e 61 6d 65 5b | 36 34 5d 3b 0d 09 0d 09 |ar.name[|64];....|
|000033d0| 74 68 65 49 74 65 6d 20 | 3d 20 4c 6f 57 6f 72 64 |theItem |= LoWord|
|000033e0| 28 6d 65 6e 75 41 6e 64 | 49 74 65 6d 29 3b 0d 09 |(menuAnd|Item);..|
|000033f0| 73 77 69 74 63 68 20 28 | 48 69 57 6f 72 64 28 6d |switch (|HiWord(m|
|00003400| 65 6e 75 41 6e 64 49 74 | 65 6d 29 29 0d 09 09 7b |enuAndIt|em))...{|
|00003410| 0d 09 63 61 73 65 20 41 | 50 50 4c 45 49 44 3a 0d |..case A|PPLEID:.|
|00003420| 09 09 69 66 20 28 74 68 | 65 49 74 65 6d 20 3e 20 |..if (th|eItem > |
|00003430| 31 29 0d 09 09 09 7b 0d | 09 09 09 47 65 74 49 74 |1)....{.|...GetIt|
|00003440| 65 6d 28 61 70 70 6c 65 | 4d 65 6e 75 2c 20 74 68 |em(apple|Menu, th|
|00003450| 65 49 74 65 6d 2c 20 28 | 53 74 72 69 6e 67 50 74 |eItem, (|StringPt|
|00003460| 72 29 6e 61 6d 65 29 3b | 0d 09 09 09 4f 70 65 6e |r)name);|....Open|
|00003470| 44 65 73 6b 41 63 63 28 | 28 53 74 72 69 6e 67 50 |DeskAcc(|(StringP|
|00003480| 74 72 29 6e 61 6d 65 29 | 3b 0d 09 09 09 7d 0d 09 |tr)name)|;....}..|
|00003490| 62 72 65 61 6b 3b 0d 09 | 63 61 73 65 20 46 49 4c |break;..|case FIL|
|000034a0| 45 49 44 3a 0d 09 09 69 | 66 20 28 74 68 65 49 74 |EID:...i|f (theIt|
|000034b0| 65 6d 20 3d 3d 20 51 55 | 49 54 29 0d 09 09 09 7b |em == QU|IT)....{|
|000034c0| 0d 09 09 09 2f 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |..../***|********|
|000034d0| 20 52 65 71 75 65 73 74 | 20 73 74 6f 70 20 44 72 | Request| stop Dr|
|000034e0| 61 67 5f 6f 6e 20 77 69 | 74 68 20 3c 43 6f 6d 6d |ag_on wi|th <Comm|
|000034f0| 61 6e 64 3e 3c 70 65 72 | 69 6f 64 3e 20 66 69 72 |and><per|iod> fir|
|00003500| 73 74 2e 20 2a 2f 0d 09 | 09 09 54 65 6c 6c 48 41 |st. */..|..TellHA|
|00003510| 57 4b 74 6f 51 75 69 74 | 28 29 3b 0d 09 09 09 72 |WKtoQuit|();....r|
|00003520| 65 74 75 72 6e 28 54 52 | 55 45 29 3b 0d 09 09 09 |eturn(TR|UE);....|
|00003530| 7d 0d 09 62 72 65 61 6b | 3b 0d 09 63 61 73 65 20 |}..break|;..case |
|00003540| 45 44 49 54 49 44 3a 0d | 09 09 69 66 20 28 74 68 |EDITID:.|..if (th|
|00003550| 65 49 74 65 6d 20 3c 3d | 20 36 20 26 26 20 53 79 |eItem <=| 6 && Sy|
|00003560| 73 74 65 6d 45 64 69 74 | 20 28 74 68 65 49 74 65 |stemEdit| (theIte|
|00003570| 6d 20 2d 20 31 29 29 0d | 09 09 09 72 65 74 75 72 |m - 1)).|...retur|
|00003580| 6e 28 46 41 4c 53 45 29 | 3b 0d 09 09 2f 2a 2a 2a |n(FALSE)|;.../***|
|00003590| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 20 43 |********|****** C|
|000035a0| 61 6c 6c 69 6e 67 20 61 | 6c 6c 20 44 72 61 67 5f |alling a|ll Drag_|
|000035b0| 6f 6e 73 20 2a 2f 0d 09 | 09 69 66 20 28 74 68 65 |ons */..|.if (the|
|000035c0| 49 74 65 6d 20 3e 20 36 | 29 0d 09 09 09 7b 0d 09 |Item > 6|)....{..|
|000035d0| 09 09 43 61 6c 6c 52 65 | 73 6f 75 72 63 65 28 20 |..CallRe|source( |
|000035e0| 45 44 49 54 49 44 2c 20 | 74 68 65 49 74 65 6d 2c |EDITID, |theItem,|
|000035f0| 0d 09 09 09 09 09 09 20 | 21 67 45 76 74 44 65 74 |....... |!gEvtDet|
|00003600| 61 69 6c 73 2e 73 68 69 | 66 74 44 6f 77 6e 20 26 |ails.shi|ftDown &|
|00003610| 26 20 21 67 45 76 74 44 | 65 74 61 69 6c 73 2e 6f |& !gEvtD|etails.o|
|00003620| 70 74 69 6f 6e 44 6f 77 | 6e 2c 0d 09 09 09 09 09 |ptionDow|n,......|
|00003630| 09 20 4e 55 4c 4c 29 3b | 0d 09 09 09 7d 0d 09 62 |. NULL);|....}..b|
|00003640| 72 65 61 6b 3b 0d 09 64 | 65 66 61 75 6c 74 3a 0d |reak;..d|efault:.|
|00003650| 09 62 72 65 61 6b 3b 0d | 09 09 7d 0d 09 48 69 6c |.break;.|..}..Hil|
|00003660| 69 74 65 4d 65 6e 75 28 | 30 29 3b 0d 09 72 65 74 |iteMenu(|0);..ret|
|00003670| 75 72 6e 28 46 41 4c 53 | 45 29 3b 0d 09 7d 20 2f |urn(FALS|E);..} /|
|00003680| 2a 20 65 6e 64 20 44 6f | 4d 65 6e 75 28 29 20 2a |* end Do|Menu() *|
|00003690| 2f 0d 0d 2f 2a 20 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/../* --|--------|
|000036a0| 2d 2d 20 41 70 70 6c 65 | 20 65 76 65 6e 74 20 68 |-- Apple| event h|
|000036b0| 61 6e 64 6c 65 72 73 20 | 2d 2d 2d 2d 2d 2d 2d 2d |andlers |--------|
|000036c0| 2d 2d 2d 2d 2d 2d 2d 20 | 2a 2f 0d 2f 2a 20 2a 2f |------- |*/./* */|
|000036d0| 0d 70 61 73 63 61 6c 20 | 4f 53 45 72 72 20 48 61 |.pascal |OSErr Ha|
|000036e0| 6e 64 6c 65 5f 61 65 76 | 74 5f 6f 61 70 70 28 41 |ndle_aev|t_oapp(A|
|000036f0| 70 70 6c 65 45 76 65 6e | 74 20 2a 74 68 65 41 70 |ppleEven|t *theAp|
|00003700| 70 6c 65 45 76 65 6e 74 | 2c 20 41 70 70 6c 65 45 |pleEvent|, AppleE|
|00003710| 76 65 6e 74 20 2a 72 65 | 70 6c 79 2c 20 6c 6f 6e |vent *re|ply, lon|
|00003720| 67 20 6d 79 52 65 66 43 | 6f 6e 29 0d 09 7b 0d 09 |g myRefC|on)..{..|
|00003730| 4f 53 45 72 72 09 74 68 | 65 45 72 72 20 3d 20 6e |OSErr.th|eErr = n|
|00003740| 6f 45 72 72 3b 0d 09 0d | 09 74 68 65 45 72 72 20 |oErr;...|.theErr |
|00003750| 3d 20 4d 69 73 73 65 64 | 41 45 4b 65 79 77 6f 72 |= Missed|AEKeywor|
|00003760| 64 28 74 68 65 41 70 70 | 6c 65 45 76 65 6e 74 29 |d(theApp|leEvent)|
|00003770| 3b 0d 09 69 66 20 28 74 | 68 65 45 72 72 29 20 72 |;..if (t|heErr) r|
|00003780| 65 74 75 72 6e 20 74 68 | 65 45 72 72 3b 0d 09 2f |eturn th|eErr;../|
|00003790| 2a 20 41 20 6c 61 72 67 | 65 72 20 61 70 70 20 6d |* A larg|er app m|
|000037a0| 69 67 68 74 20 6f 70 65 | 6e 20 73 6f 6d 65 74 68 |ight ope|n someth|
|000037b0| 69 6e 67 20 68 65 72 65 | 3b 2a 2f 0d 09 72 65 74 |ing here|;*/..ret|
|000037c0| 75 72 6e 20 74 68 65 45 | 72 72 3b 0d 09 7d 0d 0d |urn theE|rr;..}..|
|000037d0| 2f 2a 20 4d 69 6e 69 6d | 61 6c 20 41 70 70 37 20 |/* Minim|al App7 |
|000037e0| 64 6f 65 73 6e 27 74 20 | 6f 70 65 6e 20 64 6f 63 |doesn't |open doc|
|000037f0| 75 6d 65 6e 74 73 2c 20 | 62 75 74 20 69 74 20 6d |uments, |but it m|
|00003800| 69 67 68 74 20 73 6f 6d | 65 20 64 61 79 2e 2e 2e |ight som|e day...|
|00003810| 20 2a 2f 0d 70 61 73 63 | 61 6c 20 4f 53 45 72 72 | */.pasc|al OSErr|
|00003820| 20 48 61 6e 64 6c 65 5f | 61 65 76 74 5f 6f 64 6f | Handle_|aevt_odo|
|00003830| 63 28 41 70 70 6c 65 45 | 76 65 6e 74 20 2a 74 68 |c(AppleE|vent *th|
|00003840| 65 41 70 70 6c 65 45 76 | 65 6e 74 2c 20 41 70 70 |eAppleEv|ent, App|
|00003850| 6c 65 45 76 65 6e 74 20 | 2a 72 65 70 6c 79 2c 20 |leEvent |*reply, |
|00003860| 6c 6f 6e 67 20 6d 79 52 | 65 66 43 6f 6e 29 0d 09 |long myR|efCon)..|
|00003870| 7b 0d 09 41 45 44 65 73 | 63 09 09 74 68 65 41 45 |{..AEDes|c..theAE|
|00003880| 44 65 73 63 3b 0d 09 41 | 45 4b 65 79 77 6f 72 64 |Desc;..A|EKeyword|
|00003890| 09 74 68 65 41 45 4b 65 | 79 77 6f 72 64 3b 0d 09 |.theAEKe|yword;..|
|000038a0| 46 53 53 70 65 63 09 09 | 74 68 65 53 70 65 63 3b |FSSpec..|theSpec;|
|000038b0| 0d 09 44 65 73 63 54 79 | 70 65 09 74 79 70 65 43 |..DescTy|pe.typeC|
|000038c0| 6f 64 65 3b 0d 09 46 49 | 6e 66 6f 09 09 66 6e 64 |ode;..FI|nfo..fnd|
|000038d0| 72 49 6e 66 6f 3b 0d 09 | 4f 53 45 72 72 09 09 74 |rInfo;..|OSErr..t|
|000038e0| 68 65 45 72 72 3b 0d 09 | 53 69 7a 65 09 09 61 63 |heErr;..|Size..ac|
|000038f0| 74 75 61 6c 53 69 7a 65 | 3b 0d 09 6c 6f 6e 67 09 |tualSize|;..long.|
|00003900| 09 69 2c 20 63 6f 75 6e | 74 3b 0d 09 42 6f 6f 6c |.i, coun|t;..Bool|
|00003910| 65 61 6e 09 09 73 74 61 | 74 69 6f 6e 65 72 79 3b |ean..sta|tionery;|
|00003920| 0d 09 0d 09 74 68 65 45 | 72 72 20 3d 20 41 45 47 |....theE|rr = AEG|
|00003930| 65 74 50 61 72 61 6d 44 | 65 73 63 28 74 68 65 41 |etParamD|esc(theA|
|00003940| 70 70 6c 65 45 76 65 6e | 74 2c 20 6b 65 79 44 69 |ppleEven|t, keyDi|
|00003950| 72 65 63 74 4f 62 6a 65 | 63 74 2c 20 74 79 70 65 |rectObje|ct, type|
|00003960| 41 45 4c 69 73 74 2c 20 | 26 74 68 65 41 45 44 65 |AEList, |&theAEDe|
|00003970| 73 63 29 3b 0d 09 69 66 | 20 28 74 68 65 45 72 72 |sc);..if| (theErr|
|00003980| 29 20 72 65 74 75 72 6e | 20 74 68 65 45 72 72 3b |) return| theErr;|
|00003990| 0d 09 74 68 65 45 72 72 | 20 3d 20 4d 69 73 73 65 |..theErr| = Misse|
|000039a0| 64 41 45 4b 65 79 77 6f | 72 64 28 74 68 65 41 70 |dAEKeywo|rd(theAp|
|000039b0| 70 6c 65 45 76 65 6e 74 | 29 3b 0d 09 69 66 20 28 |pleEvent|);..if (|
|000039c0| 74 68 65 45 72 72 29 20 | 72 65 74 75 72 6e 20 74 |theErr) |return t|
|000039d0| 68 65 45 72 72 3b 0d 09 | 74 68 65 45 72 72 20 3d |heErr;..|theErr =|
|000039e0| 20 41 45 43 6f 75 6e 74 | 49 74 65 6d 73 28 26 74 | AECount|Items(&t|
|000039f0| 68 65 41 45 44 65 73 63 | 2c 20 26 63 6f 75 6e 74 |heAEDesc|, &count|
|00003a00| 29 3b 0d 09 69 66 20 28 | 74 68 65 45 72 72 29 20 |);..if (|theErr) |
|00003a10| 72 65 74 75 72 6e 20 74 | 68 65 45 72 72 3b 0d 09 |return t|heErr;..|
|00003a20| 66 6f 72 20 28 69 20 3d | 20 31 3b 20 69 20 3c 3d |for (i =| 1; i <=|
|00003a30| 20 63 6f 75 6e 74 3b 20 | 2b 2b 69 29 0d 09 09 7b | count; |++i)...{|
|00003a40| 0d 09 09 74 68 65 45 72 | 72 20 3d 20 41 45 47 65 |...theEr|r = AEGe|
|00003a50| 74 4e 74 68 50 74 72 28 | 26 74 68 65 41 45 44 65 |tNthPtr(|&theAEDe|
|00003a60| 73 63 2c 20 69 2c 20 74 | 79 70 65 46 53 53 2c 20 |sc, i, t|ypeFSS, |
|00003a70| 26 74 68 65 41 45 4b 65 | 79 77 6f 72 64 2c 20 26 |&theAEKe|yword, &|
|00003a80| 74 79 70 65 43 6f 64 65 | 2c 0d 09 09 09 09 09 28 |typeCode|,......(|
|00003a90| 50 74 72 29 26 74 68 65 | 53 70 65 63 2c 20 73 69 |Ptr)&the|Spec, si|
|00003aa0| 7a 65 6f 66 28 46 53 53 | 70 65 63 29 2c 20 26 61 |zeof(FSS|pec), &a|
|00003ab0| 63 74 75 61 6c 53 69 7a | 65 29 3b 0d 09 09 69 66 |ctualSiz|e);...if|
|00003ac0| 20 28 74 68 65 45 72 72 | 29 20 72 65 74 75 72 6e | (theErr|) return|
|00003ad0| 20 74 68 65 45 72 72 3b | 0d 09 09 2f 2a 20 2d 20 | theErr;|.../* - |
|00003ae0| 6d 69 6e 69 6d 61 6c 20 | 61 70 70 20 64 6f 65 73 |minimal |app does|
|00003af0| 6e 27 74 20 6b 6e 6f 77 | 20 68 6f 77 20 74 6f 20 |n't know| how to |
|00003b00| 6f 70 65 6e 20 77 69 6e | 64 6f 77 73 2e 0d 09 09 |open win|dows....|
|00003b10| 74 68 65 45 72 72 20 3d | 20 46 53 70 47 65 74 46 |theErr =| FSpGetF|
|00003b20| 49 6e 66 6f 28 26 74 68 | 65 53 70 65 63 2c 20 26 |Info(&th|eSpec, &|
|00003b30| 66 6e 64 72 49 6e 66 6f | 29 3b 0d 09 09 73 74 61 |fndrInfo|);...sta|
|00003b40| 74 69 6f 6e 65 72 79 20 | 3d 20 28 28 66 6e 64 72 |tionery |= ((fndr|
|00003b50| 49 6e 66 6f 2e 66 64 46 | 6c 61 67 73 20 26 20 30 |Info.fdF|lags & 0|
|00003b60| 78 30 38 30 30 29 20 21 | 3d 20 30 29 3b 0d 09 09 |x0800) !|= 0);...|
|00003b70| 44 6f 4e 65 77 57 69 6e | 64 6f 77 28 26 74 68 65 |DoNewWin|dow(&the|
|00003b80| 53 70 65 63 2c 20 73 74 | 61 74 69 6f 6e 65 72 79 |Spec, st|ationery|
|00003b90| 29 3b 0d 09 09 2a 2f 0d | 09 09 7d 0d 09 72 65 74 |);...*/.|..}..ret|
|00003ba0| 75 72 6e 20 6e 6f 45 72 | 72 3b 0d 09 7d 0d 0d 2f |urn noEr|r;..}../|
|00003bb0| 2a 20 2a 2f 0d 70 61 73 | 63 61 6c 20 4f 53 45 72 |* */.pas|cal OSEr|
|00003bc0| 72 20 48 61 6e 64 6c 65 | 5f 61 65 76 74 5f 70 64 |r Handle|_aevt_pd|
|00003bd0| 6f 63 28 41 70 70 6c 65 | 45 76 65 6e 74 20 2a 74 |oc(Apple|Event *t|
|00003be0| 68 65 41 70 70 6c 65 45 | 76 65 6e 74 2c 20 41 70 |heAppleE|vent, Ap|
|00003bf0| 70 6c 65 45 76 65 6e 74 | 20 2a 72 65 70 6c 79 2c |pleEvent| *reply,|
|00003c00| 20 6c 6f 6e 67 20 6d 79 | 52 65 66 43 6f 6e 29 0d | long my|RefCon).|
|00003c10| 09 7b 0d 09 72 65 74 75 | 72 6e 20 65 72 72 41 45 |.{..retu|rn errAE|
|00003c20| 45 76 65 6e 74 4e 6f 74 | 48 61 6e 64 6c 65 64 3b |EventNot|Handled;|
|00003c30| 0d 09 7d 0d 0d 2f 2a 20 | 2a 2f 0d 70 61 73 63 61 |..}../* |*/.pasca|
|00003c40| 6c 20 4f 53 45 72 72 20 | 48 61 6e 64 6c 65 5f 61 |l OSErr |Handle_a|
|00003c50| 65 76 74 5f 71 75 69 74 | 28 41 70 70 6c 65 45 76 |evt_quit|(AppleEv|
|00003c60| 65 6e 74 20 2a 74 68 65 | 41 70 70 6c 65 45 76 65 |ent *the|AppleEve|
|00003c70| 6e 74 2c 20 41 70 70 6c | 65 45 76 65 6e 74 20 2a |nt, Appl|eEvent *|
|00003c80| 72 65 70 6c 79 2c 20 6c | 6f 6e 67 20 6d 79 52 65 |reply, l|ong myRe|
|00003c90| 66 43 6f 6e 29 0d 09 7b | 0d 09 4f 53 45 72 72 09 |fCon)..{|..OSErr.|
|00003ca0| 74 68 65 45 72 72 3b 0d | 09 0d 09 74 68 65 45 72 |theErr;.|...theEr|
|00003cb0| 72 20 3d 20 4d 69 73 73 | 65 64 41 45 4b 65 79 77 |r = Miss|edAEKeyw|
|00003cc0| 6f 72 64 28 74 68 65 41 | 70 70 6c 65 45 76 65 6e |ord(theA|ppleEven|
|00003cd0| 74 29 3b 0d 09 69 66 20 | 28 74 68 65 45 72 72 29 |t);..if |(theErr)|
|00003ce0| 20 72 65 74 75 72 6e 20 | 74 68 65 45 72 72 3b 0d | return |theErr;.|
|00003cf0| 09 0d 09 54 65 6c 6c 48 | 41 57 4b 74 6f 51 75 69 |...TellH|AWKtoQui|
|00003d00| 74 28 29 3b 0d 09 67 51 | 75 69 74 74 69 6e 67 20 |t();..gQ|uitting |
|00003d10| 3d 20 54 52 55 45 3b 0d | 09 72 65 74 75 72 6e 20 |= TRUE;.|.return |
|00003d20| 6e 6f 45 72 72 3b 0d 09 | 7d 0d 0d 2f 2a 20 54 68 |noErr;..|}../* Th|
|00003d30| 65 20 6c 6f 67 69 63 20 | 68 65 72 65 20 6d 61 79 |e logic |here may|
|00003d40| 20 73 65 65 6d 20 72 65 | 76 65 72 73 65 64 2c 20 | seem re|versed, |
|00003d50| 62 75 74 20 74 68 65 20 | 67 6f 61 6c 20 69 73 20 |but the |goal is |
|00003d60| 74 6f 20 63 68 65 63 6b | 20 69 66 0d 61 6e 79 74 |to check| if.anyt|
|00003d70| 68 69 6e 67 20 77 61 73 | 20 6d 69 73 73 65 64 2e |hing was| missed.|
|00003d80| 20 22 4e 6f 74 46 6f 75 | 6e 64 22 20 6d 65 61 6e | "NotFou|nd" mean|
|00003d90| 73 20 74 68 65 20 73 65 | 61 72 63 68 20 66 6f 72 |s the se|arch for|
|00003da0| 20 73 6f 6d 65 74 68 69 | 6e 67 20 6d 69 73 73 65 | somethi|ng misse|
|00003db0| 64 0d 74 75 72 6e 65 64 | 20 75 70 20 6e 6f 74 68 |d.turned| up noth|
|00003dc0| 69 6e 67 2c 20 73 6f 20 | 61 6c 6c 20 77 61 73 20 |ing, so |all was |
|00003dd0| 77 65 6c 6c 2e 0d 2a 2f | 0d 4f 53 45 72 72 20 4d |well..*/|.OSErr M|
|00003de0| 69 73 73 65 64 41 45 4b | 65 79 77 6f 72 64 28 41 |issedAEK|eyword(A|
|00003df0| 70 70 6c 65 45 76 65 6e | 74 20 2a 74 68 65 41 70 |ppleEven|t *theAp|
|00003e00| 70 6c 65 45 76 65 6e 74 | 29 0d 09 7b 0d 09 4f 53 |pleEvent|)..{..OS|
|00003e10| 45 72 72 09 09 74 68 65 | 45 72 72 3b 0d 09 44 65 |Err..the|Err;..De|
|00003e20| 73 63 54 79 70 65 09 74 | 79 70 65 43 6f 64 65 3b |scType.t|ypeCode;|
|00003e30| 0d 09 53 69 7a 65 09 09 | 61 63 74 75 61 6c 53 69 |..Size..|actualSi|
|00003e40| 7a 65 3b 0d 09 0d 09 74 | 68 65 45 72 72 20 3d 20 |ze;....t|heErr = |
|00003e50| 41 45 47 65 74 41 74 74 | 72 69 62 75 74 65 50 74 |AEGetAtt|ributePt|
|00003e60| 72 28 74 68 65 41 70 70 | 6c 65 45 76 65 6e 74 2c |r(theApp|leEvent,|
|00003e70| 20 6b 65 79 4d 69 73 73 | 65 64 4b 65 79 77 6f 72 | keyMiss|edKeywor|
|00003e80| 64 41 74 74 72 2c 0d 09 | 09 09 09 74 79 70 65 57 |dAttr,..|...typeW|
|00003e90| 69 6c 64 43 61 72 64 2c | 20 26 74 79 70 65 43 6f |ildCard,| &typeCo|
|00003ea0| 64 65 2c 20 4e 55 4c 4c | 2c 20 30 2c 20 26 61 63 |de, NULL|, 0, &ac|
|00003eb0| 74 75 61 6c 53 69 7a 65 | 29 3b 0d 09 69 66 20 28 |tualSize|);..if (|
|00003ec0| 74 68 65 45 72 72 20 3d | 3d 20 65 72 72 41 45 44 |theErr =|= errAED|
|00003ed0| 65 73 63 4e 6f 74 46 6f | 75 6e 64 29 0d 09 09 72 |escNotFo|und)...r|
|00003ee0| 65 74 75 72 6e 20 6e 6f | 45 72 72 3b 0d 09 69 66 |eturn no|Err;..if|
|00003ef0| 20 28 74 68 65 45 72 72 | 20 3d 3d 20 6e 6f 45 72 | (theErr| == noEr|
|00003f00| 72 29 0d 09 09 72 65 74 | 75 72 6e 20 65 72 72 41 |r)...ret|urn errA|
|00003f10| 45 45 76 65 6e 74 4e 6f | 74 48 61 6e 64 6c 65 64 |EEventNo|tHandled|
|00003f20| 3b 0d 09 72 65 74 75 72 | 6e 20 74 68 65 45 72 72 |;..retur|n theErr|
|00003f30| 3b 0d 09 7d 0d 0d 2f 2a | 20 2d 2d 2d 2d 2d 2d 2d |;..}../*| -------|
|00003f40| 2d 2d 2d 20 73 6f 6d 65 | 20 57 4e 45 20 66 75 6e |--- some| WNE fun|
|00003f50| 63 74 69 6f 6e 73 20 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ctions -|--------|
|00003f60| 20 2a 2f 0d 76 6f 69 64 | 20 48 61 6e 64 6c 65 4d | */.void| HandleM|
|00003f70| 6f 64 65 6c 65 73 73 44 | 69 61 6c 6f 67 28 29 0d |odelessD|ialog().|
|00003f80| 09 7b 0d 09 3b 0d 09 7d | 0d 0d 76 6f 69 64 20 53 |.{..;..}|..void S|
|00003f90| 65 74 45 76 65 6e 74 44 | 65 74 61 69 6c 73 28 29 |etEventD|etails()|
|00003fa0| 0d 09 7b 0d 09 73 74 61 | 74 69 63 20 75 6e 73 69 |..{..sta|tic unsi|
|00003fb0| 67 6e 65 64 20 6c 6f 6e | 67 20 09 6f 6c 64 54 69 |gned lon|g .oldTi|
|00003fc0| 6d 65 20 3d 20 30 4c 3b | 0d 09 73 74 61 74 69 63 |me = 0L;|..static|
|00003fd0| 20 50 6f 69 6e 74 09 09 | 09 67 6c 6f 62 61 6c 57 | Point..|.globalW|
|00003fe0| 68 65 72 65 20 3d 20 7b | 2d 31 30 30 30 2c 20 2d |here = {|-1000, -|
|00003ff0| 31 30 30 30 7d 3b 0d 09 | 75 6e 73 69 67 6e 65 64 |1000};..|unsigned|
|00004000| 20 6c 6f 6e 67 09 09 09 | 6e 65 77 54 69 6d 65 3b | long...|newTime;|
|00004010| 0d 09 73 68 6f 72 74 09 | 09 09 09 64 48 2c 20 64 |..short.|...dH, d|
|00004020| 56 3b 0d 09 50 6f 69 6e | 74 09 09 09 6e 65 77 57 |V;..Poin|t...newW|
|00004030| 68 65 72 65 3b 0d 09 0d | 09 69 66 20 28 67 45 76 |here;...|.if (gEv|
|00004040| 74 44 65 74 61 69 6c 73 | 2e 65 76 65 6e 74 2e 77 |tDetails|.event.w|
|00004050| 68 61 74 20 3d 3d 20 6d | 6f 75 73 65 44 6f 77 6e |hat == m|ouseDown|
|00004060| 20 7c 7c 20 67 45 76 74 | 44 65 74 61 69 6c 73 2e | || gEvt|Details.|
|00004070| 65 76 65 6e 74 2e 77 68 | 61 74 20 3d 3d 20 6b 65 |event.wh|at == ke|
|00004080| 79 44 6f 77 6e 0d 09 09 | 7c 7c 20 67 45 76 74 44 |yDown...||| gEvtD|
|00004090| 65 74 61 69 6c 73 2e 65 | 76 65 6e 74 2e 77 68 61 |etails.e|vent.wha|
|000040a0| 74 20 3d 3d 20 6b 4f 53 | 45 76 65 6e 74 29 0d 09 |t == kOS|Event)..|
|000040b0| 09 7b 0d 09 09 67 45 76 | 74 44 65 74 61 69 6c 73 |.{...gEv|tDetails|
|000040c0| 2e 73 68 69 66 74 44 6f | 77 6e 20 3d 20 28 67 45 |.shiftDo|wn = (gE|
|000040d0| 76 74 44 65 74 61 69 6c | 73 2e 65 76 65 6e 74 2e |vtDetail|s.event.|
|000040e0| 6d 6f 64 69 66 69 65 72 | 73 20 26 20 73 68 69 66 |modifier|s & shif|
|000040f0| 74 4b 65 79 29 20 21 3d | 20 30 3b 0d 09 09 67 45 |tKey) !=| 0;...gE|
|00004100| 76 74 44 65 74 61 69 6c | 73 2e 63 61 70 73 4c 6f |vtDetail|s.capsLo|
|00004110| 63 6b 44 6f 77 6e 20 3d | 20 28 67 45 76 74 44 65 |ckDown =| (gEvtDe|
|00004120| 74 61 69 6c 73 2e 65 76 | 65 6e 74 2e 6d 6f 64 69 |tails.ev|ent.modi|
|00004130| 66 69 65 72 73 20 26 20 | 61 6c 70 68 61 4c 6f 63 |fiers & |alphaLoc|
|00004140| 6b 29 20 21 3d 20 30 3b | 0d 09 09 67 45 76 74 44 |k) != 0;|...gEvtD|
|00004150| 65 74 61 69 6c 73 2e 6f | 70 74 69 6f 6e 44 6f 77 |etails.o|ptionDow|
|00004160| 6e 20 3d 20 28 67 45 76 | 74 44 65 74 61 69 6c 73 |n = (gEv|tDetails|
|00004170| 2e 65 76 65 6e 74 2e 6d | 6f 64 69 66 69 65 72 73 |.event.m|odifiers|
|00004180| 20 26 20 6f 70 74 69 6f | 6e 4b 65 79 29 20 21 3d | & optio|nKey) !=|
|00004190| 20 30 3b 0d 09 09 67 45 | 76 74 44 65 74 61 69 6c | 0;...gE|vtDetail|
|000041a0| 73 2e 63 6f 6d 6d 61 6e | 64 44 6f 77 6e 20 3d 20 |s.comman|dDown = |
|000041b0| 28 67 45 76 74 44 65 74 | 61 69 6c 73 2e 65 76 65 |(gEvtDet|ails.eve|
|000041c0| 6e 74 2e 6d 6f 64 69 66 | 69 65 72 73 20 26 20 63 |nt.modif|iers & c|
|000041d0| 6d 64 4b 65 79 29 20 21 | 3d 20 30 3b 0d 09 09 7d |mdKey) !|= 0;...}|
|000041e0| 0d 09 69 66 20 28 67 45 | 76 74 44 65 74 61 69 6c |..if (gE|vtDetail|
|000041f0| 73 2e 65 76 65 6e 74 2e | 77 68 61 74 20 3d 3d 20 |s.event.|what == |
|00004200| 6d 6f 75 73 65 44 6f 77 | 6e 29 0d 09 09 7b 0d 09 |mouseDow|n)...{..|
|00004210| 09 44 65 6c 61 79 28 30 | 4c 2c 20 28 6c 6f 6e 67 |.Delay(0|L, (long|
|00004220| 20 2a 29 26 6e 65 77 54 | 69 6d 65 29 3b 0d 09 09 | *)&newT|ime);...|
|00004230| 6e 65 77 57 68 65 72 65 | 20 3d 20 67 45 76 74 44 |newWhere| = gEvtD|
|00004240| 65 74 61 69 6c 73 2e 65 | 76 65 6e 74 2e 77 68 65 |etails.e|vent.whe|
|00004250| 72 65 3b 0d 09 09 64 48 | 20 3d 20 6e 65 77 57 68 |re;...dH| = newWh|
|00004260| 65 72 65 2e 68 20 2d 20 | 67 6c 6f 62 61 6c 57 68 |ere.h - |globalWh|
|00004270| 65 72 65 2e 68 3b 0d 09 | 09 64 56 20 3d 20 6e 65 |ere.h;..|.dV = ne|
|00004280| 77 57 68 65 72 65 2e 76 | 20 2d 20 67 6c 6f 62 61 |wWhere.v| - globa|
|00004290| 6c 57 68 65 72 65 2e 76 | 3b 0d 09 09 69 66 20 28 |lWhere.v|;...if (|
|000042a0| 64 48 20 3c 20 30 29 0d | 09 09 09 64 48 20 3d 20 |dH < 0).|...dH = |
|000042b0| 2d 64 48 3b 0d 09 09 69 | 66 20 28 64 56 20 3c 20 |-dH;...i|f (dV < |
|000042c0| 30 29 0d 09 09 09 64 56 | 20 3d 20 2d 64 56 3b 0d |0)....dV| = -dV;.|
|000042d0| 09 09 69 66 20 28 28 6e | 65 77 54 69 6d 65 20 2d |..if ((n|ewTime -|
|000042e0| 20 6f 6c 64 54 69 6d 65 | 29 20 3c 3d 20 47 65 74 | oldTime|) <= Get|
|000042f0| 44 62 6c 54 69 6d 65 28 | 29 0d 09 09 09 26 26 20 |DblTime(|)....&& |
|00004300| 64 48 20 3c 3d 20 35 20 | 26 26 20 64 56 20 3c 3d |dH <= 5 |&& dV <=|
|00004310| 20 35 29 0d 09 09 09 67 | 45 76 74 44 65 74 61 69 | 5)....g|EvtDetai|
|00004320| 6c 73 2e 64 6f 75 62 6c | 65 43 6c 69 63 6b 20 3d |ls.doubl|eClick =|
|00004330| 20 54 52 55 45 3b 0d 09 | 09 65 6c 73 65 0d 09 09 | TRUE;..|.else...|
|00004340| 09 67 45 76 74 44 65 74 | 61 69 6c 73 2e 64 6f 75 |.gEvtDet|ails.dou|
|00004350| 62 6c 65 43 6c 69 63 6b | 20 3d 20 46 41 4c 53 45 |bleClick| = FALSE|
|00004360| 3b 0d 09 09 67 6c 6f 62 | 61 6c 57 68 65 72 65 20 |;...glob|alWhere |
|00004370| 3d 20 6e 65 77 57 68 65 | 72 65 3b 0d 09 09 47 6c |= newWhe|re;...Gl|
|00004380| 6f 62 61 6c 54 6f 4c 6f | 63 61 6c 20 28 26 6e 65 |obalToLo|cal (&ne|
|00004390| 77 57 68 65 72 65 29 3b | 0d 09 09 67 45 76 74 44 |wWhere);|...gEvtD|
|000043a0| 65 74 61 69 6c 73 2e 6c | 6f 63 61 6c 57 68 65 72 |etails.l|ocalWher|
|000043b0| 65 20 3d 20 6e 65 77 57 | 68 65 72 65 3b 0d 09 09 |e = newW|here;...|
|000043c0| 6f 6c 64 54 69 6d 65 20 | 3d 20 6e 65 77 54 69 6d |oldTime |= newTim|
|000043d0| 65 3b 0d 09 09 7d 0d 09 | 65 6c 73 65 0d 09 09 67 |e;...}..|else...g|
|000043e0| 45 76 74 44 65 74 61 69 | 6c 73 2e 64 6f 75 62 6c |EvtDetai|ls.doubl|
|000043f0| 65 43 6c 69 63 6b 20 3d | 20 46 41 4c 53 45 3b 0d |eClick =| FALSE;.|
|00004400| 09 7d 0d 0d 0d 75 6e 73 | 69 67 6e 65 64 20 6c 6f |.}...uns|igned lo|
|00004410| 6e 67 20 47 65 74 53 6c | 65 65 70 28 29 0d 09 7b |ng GetSl|eep()..{|
|00004420| 0d 09 6c 6f 6e 67 09 09 | 73 6c 65 65 70 3b 0d 09 |..long..|sleep;..|
|00004430| 0d 09 2f 2a 2a 2a 2a 2a | 2a 2a 2a 20 4c 65 73 73 |../*****|*** Less|
|00004440| 20 73 6c 65 65 70 69 6e | 67 20 69 66 20 68 41 57 | sleepin|g if hAW|
|00004450| 4b 20 69 73 20 72 75 6e | 6e 69 6e 67 20 2d 20 61 |K is run|ning - a|
|00004460| 64 6a 75 73 74 20 69 66 | 20 79 6f 75 20 6c 69 6b |djust if| you lik|
|00004470| 65 2e 20 2a 2f 0d 09 69 | 66 20 28 67 48 61 77 6b |e. */..i|f (gHawk|
|00004480| 49 73 52 75 6e 6e 69 6e | 67 29 0d 09 09 72 65 74 |IsRunnin|g)...ret|
|00004490| 75 72 6e 28 32 55 4c 29 | 3b 0d 09 73 6c 65 65 70 |urn(2UL)|;..sleep|
|000044a0| 20 3d 20 47 65 74 43 61 | 72 65 74 54 69 6d 65 28 | = GetCa|retTime(|
|000044b0| 29 3b 0d 09 72 65 74 75 | 72 6e 28 28 75 6e 73 69 |);..retu|rn((unsi|
|000044c0| 67 6e 65 64 20 6c 6f 6e | 67 29 73 6c 65 65 70 29 |gned lon|g)sleep)|
|000044d0| 3b 0d 09 7d 0d 0d 0d 2f | 2a 0d 20 2a 20 42 6c 69 |;..}.../|*. * Bli|
|000044e0| 6e 6b 54 65 78 74 43 75 | 72 73 6f 72 20 2d 20 66 |nkTextCu|rsor - f|
|000044f0| 6c 61 73 68 20 63 75 72 | 73 6f 72 0d 20 2a 2f 0d |lash cur|sor. */.|
|00004500| 76 6f 69 64 20 42 6c 69 | 6e 6b 54 65 78 74 43 75 |void Bli|nkTextCu|
|00004510| 72 73 6f 72 28 29 0d 09 | 7b 0d 09 57 69 6e 64 6f |rsor()..|{..Windo|
|00004520| 77 44 61 74 61 50 74 72 | 20 77 64 50 74 72 3b 0d |wDataPtr| wdPtr;.|
|00004530| 09 44 69 61 6c 6f 67 50 | 74 72 09 64 50 3b 0d 09 |.DialogP|tr.dP;..|
|00004540| 73 68 6f 72 74 09 09 09 | 69 74 65 6d 3b 0d 09 0d |short...|item;...|
|00004550| 09 2f 2a 20 77 65 20 6f | 6e 6c 79 20 61 64 6a 75 |./* we o|nly adju|
|00004560| 73 74 20 74 68 65 20 63 | 75 72 73 6f 72 20 77 68 |st the c|ursor wh|
|00004570| 65 6e 20 77 65 20 61 72 | 65 20 69 6e 20 66 72 6f |en we ar|e in fro|
|00004580| 6e 74 20 2a 2f 0d 09 69 | 66 20 28 67 49 6e 42 61 |nt */..i|f (gInBa|
|00004590| 63 6b 67 72 6f 75 6e 64 | 29 0d 09 09 72 65 74 75 |ckground|)...retu|
|000045a0| 72 6e 3b 0d 09 77 64 50 | 74 72 20 3d 20 28 57 69 |rn;..wdP|tr = (Wi|
|000045b0| 6e 64 6f 77 44 61 74 61 | 50 74 72 29 20 46 72 6f |ndowData|Ptr) Fro|
|000045c0| 6e 74 57 69 6e 64 6f 77 | 28 29 3b 0d 09 2f 2a 20 |ntWindow|();../* |
|000045d0| 59 6f 75 72 20 69 64 6c | 65 20 70 72 6f 63 65 64 |Your idl|e proced|
|000045e0| 75 72 65 20 68 65 72 65 | 20 2a 2f 0d 09 7d 0d 0d |ure here| */..}..|
|000045f0| 2f 2a 20 4d 6f 72 65 20 | 74 68 61 6e 20 6e 65 65 |/* More |than nee|
|00004600| 64 65 64 20 68 65 72 65 | 2c 20 79 6f 75 20 63 61 |ded here|, you ca|
|00004610| 6e 20 62 75 69 6c 64 20 | 6f 6e 20 74 68 69 73 20 |n build |on this |
|00004620| 66 6f 72 20 79 6f 75 72 | 20 6f 77 6e 0d 63 75 72 |for your| own.cur|
|00004630| 73 6f 72 20 6d 61 6e 61 | 67 65 6d 65 6e 74 2e 20 |sor mana|gement. |
|00004640| 2a 2f 0d 76 6f 69 64 20 | 41 64 6a 75 73 74 43 75 |*/.void |AdjustCu|
|00004650| 72 73 6f 72 28 50 6f 69 | 6e 74 20 6d 6f 75 73 65 |rsor(Poi|nt mouse|
|00004660| 2c 20 52 67 6e 48 61 6e | 64 6c 65 20 72 65 67 69 |, RgnHan|dle regi|
|00004670| 6f 6e 29 0d 09 7b 0d 09 | 57 69 6e 64 6f 77 44 61 |on)..{..|WindowDa|
|00004680| 74 61 50 74 72 20 77 64 | 50 74 72 3b 0d 09 52 65 |taPtr wd|Ptr;..Re|
|00004690| 63 74 09 09 69 42 65 61 | 6d 52 65 63 74 3b 0d 0d |ct..iBea|mRect;..|
|000046a0| 09 77 64 50 74 72 20 3d | 20 28 57 69 6e 64 6f 77 |.wdPtr =| (Window|
|000046b0| 44 61 74 61 50 74 72 29 | 20 46 72 6f 6e 74 57 69 |DataPtr)| FrontWi|
|000046c0| 6e 64 6f 77 28 29 3b 20 | 2f 2a 20 41 64 6a 75 73 |ndow(); |/* Adjus|
|000046d0| 74 20 74 68 65 20 63 75 | 72 73 6f 72 20 6f 6e 6c |t the cu|rsor onl|
|000046e0| 79 20 77 68 65 6e 20 77 | 65 20 61 72 65 20 69 6e |y when w|e are in|
|000046f0| 20 66 72 6f 6e 74 20 2a | 2f 0d 09 69 66 20 28 21 | front *|/..if (!|
|00004700| 67 49 6e 42 61 63 6b 67 | 72 6f 75 6e 64 20 26 26 |gInBackg|round &&|
|00004710| 20 21 64 61 49 6e 46 72 | 6f 6e 74 29 0d 09 09 7b | !daInFr|ont)...{|
|00004720| 0d 09 09 2f 2a 20 63 61 | 6c 63 75 6c 61 74 65 20 |.../* ca|lculate |
|00004730| 72 65 67 69 6f 6e 73 20 | 66 6f 72 20 64 69 66 66 |regions |for diff|
|00004740| 65 72 65 6e 74 20 63 75 | 72 73 6f 72 20 73 68 61 |erent cu|rsor sha|
|00004750| 70 65 73 20 2a 2f 0d 09 | 09 53 65 74 52 65 63 74 |pes */..|.SetRect|
|00004760| 52 67 6e 28 69 42 65 61 | 6d 52 67 6e 2c 20 30 2c |Rgn(iBea|mRgn, 0,|
|00004770| 30 2c 30 2c 30 29 3b 0d | 09 09 2f 2a 20 73 74 61 |0,0,0);.|../* sta|
|00004780| 72 74 20 61 72 72 6f 77 | 52 67 6e 20 77 69 64 65 |rt arrow|Rgn wide|
|00004790| 20 6f 70 65 6e 20 2a 2f | 0d 09 09 53 65 74 52 65 | open */|...SetRe|
|000047a0| 63 74 52 67 6e 28 61 72 | 72 6f 77 52 67 6e 2c 20 |ctRgn(ar|rowRgn, |
|000047b0| 6b 45 78 74 72 65 6d 65 | 4e 65 67 2c 20 6b 45 78 |kExtreme|Neg, kEx|
|000047c0| 74 72 65 6d 65 4e 65 67 | 2c 20 6b 45 78 74 72 65 |tremeNeg|, kExtre|
|000047d0| 6d 65 50 6f 73 2c 20 6b | 45 78 74 72 65 6d 65 50 |mePos, k|ExtremeP|
|000047e0| 6f 73 29 3b 0d 0d 09 09 | 2f 2a 20 63 61 6c 63 75 |os);....|/* calcu|
|000047f0| 6c 61 74 65 20 69 42 65 | 61 6d 52 67 6e 20 2a 2f |late iBe|amRgn */|
|00004800| 0d 09 09 69 66 20 28 49 | 73 4d 75 6c 74 69 43 75 |...if (I|sMultiCu|
|00004810| 72 73 6f 72 57 69 6e 64 | 6f 77 28 77 64 50 74 72 |rsorWind|ow(wdPtr|
|00004820| 29 29 0d 09 09 09 7b 0d | 09 09 09 2f 2a 20 47 65 |))....{.|.../* Ge|
|00004830| 74 59 6f 75 72 54 65 78 | 74 52 65 63 74 28 77 64 |tYourTex|tRect(wd|
|00004840| 50 74 72 2c 20 26 69 42 | 65 61 6d 52 65 63 74 29 |Ptr, &iB|eamRect)|
|00004850| 3b 20 2d 20 6e 6f 74 20 | 69 6d 70 6c 65 6d 65 6e |; - not |implemen|
|00004860| 74 65 64 2c 0d 09 09 09 | 73 68 6f 75 6c 64 20 72 |ted,....|should r|
|00004870| 65 70 6c 61 63 65 20 6e | 65 78 74 20 6c 69 6e 65 |eplace n|ext line|
|00004880| 2e 20 2a 2f 0d 09 09 09 | 69 42 65 61 6d 52 65 63 |. */....|iBeamRec|
|00004890| 74 20 3d 20 28 28 57 69 | 6e 64 6f 77 50 65 65 6b |t = ((Wi|ndowPeek|
|000048a0| 29 77 64 50 74 72 29 2d | 3e 70 6f 72 74 2e 70 6f |)wdPtr)-|>port.po|
|000048b0| 72 74 52 65 63 74 3b 0d | 09 09 09 52 65 63 74 52 |rtRect;.|...RectR|
|000048c0| 67 6e 28 69 42 65 61 6d | 52 67 6e 2c 20 26 69 42 |gn(iBeam|Rgn, &iB|
|000048d0| 65 61 6d 52 65 63 74 29 | 3b 0d 09 09 09 53 65 63 |eamRect)|;....Sec|
|000048e0| 74 52 67 6e 28 69 42 65 | 61 6d 52 67 6e 2c 20 28 |tRgn(iBe|amRgn, (|
|000048f0| 28 57 69 6e 64 6f 77 50 | 74 72 29 77 64 50 74 72 |(WindowP|tr)wdPtr|
|00004900| 29 2d 3e 76 69 73 52 67 | 6e 2c 20 69 42 65 61 6d |)->visRg|n, iBeam|
|00004910| 52 67 6e 29 3b 0d 09 09 | 09 2f 2a 20 6d 61 6b 65 |Rgn);...|./* make|
|00004920| 20 61 20 67 6c 6f 62 61 | 6c 20 76 65 72 73 69 6f | a globa|l versio|
|00004930| 6e 20 6f 66 20 74 68 65 | 20 69 42 65 61 6d 52 67 |n of the| iBeamRg|
|00004940| 6e 20 2a 2f 0d 09 09 09 | 4f 66 66 73 65 74 52 67 |n */....|OffsetRg|
|00004950| 6e 28 69 42 65 61 6d 52 | 67 6e 2c 2d 28 28 57 69 |n(iBeamR|gn,-((Wi|
|00004960| 6e 64 6f 77 50 74 72 29 | 77 64 50 74 72 29 2d 3e |ndowPtr)|wdPtr)->|
|00004970| 70 6f 72 74 42 69 74 73 | 2e 62 6f 75 6e 64 73 2e |portBits|.bounds.|
|00004980| 6c 65 66 74 2c 0d 09 09 | 09 09 09 2d 28 28 57 69 |left,...|...-((Wi|
|00004990| 6e 64 6f 77 50 74 72 29 | 77 64 50 74 72 29 2d 3e |ndowPtr)|wdPtr)->|
|000049a0| 70 6f 72 74 42 69 74 73 | 2e 62 6f 75 6e 64 73 2e |portBits|.bounds.|
|000049b0| 74 6f 70 29 3b 0d 09 09 | 09 7d 0d 0d 09 09 2f 2a |top);...|.}..../*|
|000049c0| 20 73 75 62 74 72 61 63 | 74 20 6f 74 68 65 72 20 | subtrac|t other |
|000049d0| 72 65 67 69 6f 6e 73 20 | 66 72 6f 6d 20 61 72 72 |regions |from arr|
|000049e0| 6f 77 52 67 6e 20 2a 2f | 0d 09 09 44 69 66 66 52 |owRgn */|...DiffR|
|000049f0| 67 6e 28 61 72 72 6f 77 | 52 67 6e 2c 20 69 42 65 |gn(arrow|Rgn, iBe|
|00004a00| 61 6d 52 67 6e 2c 20 61 | 72 72 6f 77 52 67 6e 29 |amRgn, a|rrowRgn)|
|00004a10| 3b 0d 0d 09 09 2f 2a 20 | 63 68 61 6e 67 65 20 74 |;..../* |change t|
|00004a20| 68 65 20 63 75 72 73 6f | 72 20 61 6e 64 20 74 68 |he curso|r and th|
|00004a30| 65 20 72 65 67 69 6f 6e | 20 70 61 72 61 6d 65 74 |e region| paramet|
|00004a40| 65 72 20 2a 2f 0d 09 09 | 69 66 20 28 50 74 49 6e |er */...|if (PtIn|
|00004a50| 52 67 6e 28 6d 6f 75 73 | 65 2c 20 69 42 65 61 6d |Rgn(mous|e, iBeam|
|00004a60| 52 67 6e 29 20 29 0d 09 | 09 09 7b 0d 09 09 09 53 |Rgn) )..|..{....S|
|00004a70| 65 74 43 75 72 73 6f 72 | 28 2a 49 42 65 61 6d 29 |etCursor|(*IBeam)|
|00004a80| 3b 0d 09 09 09 43 6f 70 | 79 52 67 6e 28 69 42 65 |;....Cop|yRgn(iBe|
|00004a90| 61 6d 52 67 6e 2c 20 72 | 65 67 69 6f 6e 29 3b 0d |amRgn, r|egion);.|
|00004aa0| 09 09 09 7d 0d 09 09 65 | 6c 73 65 0d 09 09 09 7b |...}...e|lse....{|
|00004ab0| 0d 09 09 09 49 6e 69 74 | 43 75 72 73 6f 72 28 29 |....Init|Cursor()|
|00004ac0| 3b 0d 09 09 09 43 6f 70 | 79 52 67 6e 28 61 72 72 |;....Cop|yRgn(arr|
|00004ad0| 6f 77 52 67 6e 2c 20 72 | 65 67 69 6f 6e 29 3b 0d |owRgn, r|egion);.|
|00004ae0| 09 09 09 7d 0d 09 09 7d | 0d 09 7d 0d 0d 42 6f 6f |...}...}|..}..Boo|
|00004af0| 6c 65 61 6e 09 49 73 4d | 75 6c 74 69 43 75 72 73 |lean.IsM|ultiCurs|
|00004b00| 6f 72 57 69 6e 64 6f 77 | 28 57 69 6e 64 6f 77 44 |orWindow|(WindowD|
|00004b10| 61 74 61 50 74 72 20 77 | 64 50 74 72 29 0d 09 7b |ataPtr w|dPtr)..{|
|00004b20| 0d 09 72 65 74 75 72 6e | 28 46 41 4c 53 45 29 3b |..return|(FALSE);|
|00004b30| 0d 09 7d 0d 0d 2f 2a 20 | 53 65 74 57 61 74 63 68 |..}../* |SetWatch|
|00004b40| 43 75 72 73 6f 72 20 2d | 20 63 68 61 6e 67 65 20 |Cursor -| change |
|00004b50| 63 75 72 73 6f 72 20 74 | 6f 20 77 61 74 63 68 2c |cursor t|o watch,|
|00004b60| 20 69 66 20 61 76 61 69 | 6c 61 62 6c 65 0d 2a 2f | if avai|lable.*/|
|00004b70| 0d 76 6f 69 64 20 53 65 | 74 57 61 74 63 68 43 75 |.void Se|tWatchCu|
|00004b80| 72 73 6f 72 28 29 0d 09 | 7b 0d 09 69 66 20 28 57 |rsor()..|{..if (W|
|00004b90| 61 74 63 68 29 0d 09 09 | 53 65 74 43 75 72 73 6f |atch)...|SetCurso|
|00004ba0| 72 20 28 2a 57 61 74 63 | 68 29 3b 0d 09 65 6c 73 |r (*Watc|h);..els|
|00004bb0| 65 0d 09 09 49 6e 69 74 | 43 75 72 73 6f 72 28 29 |e...Init|Cursor()|
|00004bc0| 3b 0d 09 7d 0d 0d 2f 2a | 20 2d 2d 2d 2d 2d 2d 2d |;..}../*| -------|
|00004bd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 20 73 75 70 70 6f 72 |--------|- suppor|
|00004be0| 74 20 66 75 6e 63 74 69 | 6f 6e 73 20 2d 2d 2d 2d |t functi|ons ----|
|00004bf0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 20 2a 2f 0d 0d 23 |--------|-- */..#|
|00004c00| 69 66 6e 64 65 66 20 5f | 47 65 73 74 61 6c 74 44 |ifndef _|GestaltD|
|00004c10| 69 73 70 61 74 63 68 0d | 23 64 65 66 69 6e 65 20 |ispatch.|#define |
|00004c20| 5f 47 65 73 74 61 6c 74 | 44 69 73 70 61 74 63 68 |_Gestalt|Dispatch|
|00004c30| 09 09 09 09 30 78 41 30 | 41 44 0d 23 65 6e 64 69 |....0xA0|AD.#endi|
|00004c40| 66 0d 0d 2f 2a 20 2a 2f | 0d 42 6f 6f 6c 65 61 6e |f../* */|.Boolean|
|00004c50| 20 53 79 73 74 65 6d 37 | 41 76 61 69 6c 61 62 6c | System7|Availabl|
|00004c60| 65 28 29 0d 09 7b 0d 09 | 6c 6f 6e 67 09 73 79 73 |e()..{..|long.sys|
|00004c70| 56 65 72 73 69 6f 6e 3b | 0d 09 0d 09 69 66 20 28 |Version;|....if (|
|00004c80| 21 54 72 61 70 41 76 61 | 69 6c 61 62 6c 65 28 5f |!TrapAva|ilable(_|
|00004c90| 47 65 73 74 61 6c 74 44 | 69 73 70 61 74 63 68 29 |GestaltD|ispatch)|
|00004ca0| 29 0d 09 09 72 65 74 75 | 72 6e 20 46 41 4c 53 45 |)...retu|rn FALSE|
|00004cb0| 3b 0d 09 69 66 20 28 21 | 47 65 73 74 61 6c 74 28 |;..if (!|Gestalt(|
|00004cc0| 67 65 73 74 61 6c 74 53 | 79 73 74 65 6d 56 65 72 |gestaltS|ystemVer|
|00004cd0| 73 69 6f 6e 2c 26 73 79 | 73 56 65 72 73 69 6f 6e |sion,&sy|sVersion|
|00004ce0| 29 29 0d 09 09 7b 0d 09 | 09 69 66 20 28 73 79 73 |))...{..|.if (sys|
|00004cf0| 56 65 72 73 69 6f 6e 20 | 3e 3d 20 30 78 37 30 30 |Version |>= 0x700|
|00004d00| 29 0d 09 09 09 72 65 74 | 75 72 6e 20 54 52 55 45 |)....ret|urn TRUE|
|00004d10| 3b 0d 09 09 7d 0d 09 72 | 65 74 75 72 6e 20 46 41 |;...}..r|eturn FA|
|00004d20| 4c 53 45 3b 0d 09 7d 0d | 0d 2f 2a 20 2a 2f 0d 42 |LSE;..}.|./* */.B|
|00004d30| 6f 6f 6c 65 61 6e 20 54 | 72 61 70 41 76 61 69 6c |oolean T|rapAvail|
|00004d40| 61 62 6c 65 28 73 68 6f | 72 74 20 74 68 65 54 72 |able(sho|rt theTr|
|00004d50| 61 70 29 0d 09 7b 0d 09 | 54 72 61 70 54 79 70 65 |ap)..{..|TrapType|
|00004d60| 09 09 74 54 79 70 65 3b | 0d 09 0d 09 74 54 79 70 |..tType;|....tTyp|
|00004d70| 65 20 3d 20 47 65 74 54 | 72 61 70 54 79 70 65 28 |e = GetT|rapType(|
|00004d80| 74 68 65 54 72 61 70 29 | 3b 0d 09 69 66 20 28 74 |theTrap)|;..if (t|
|00004d90| 54 79 70 65 20 3d 3d 20 | 54 6f 6f 6c 54 72 61 70 |Type == |ToolTrap|
|00004da0| 29 0d 09 09 7b 0d 09 09 | 74 68 65 54 72 61 70 20 |)...{...|theTrap |
|00004db0| 3d 20 28 74 68 65 54 72 | 61 70 20 26 20 30 78 30 |= (theTr|ap & 0x0|
|00004dc0| 37 46 46 29 3b 0d 09 09 | 69 66 20 28 74 68 65 54 |7FF);...|if (theT|
|00004dd0| 72 61 70 20 3e 3d 20 4e | 75 6d 54 6f 6f 6c 62 6f |rap >= N|umToolbo|
|00004de0| 78 54 72 61 70 73 28 29 | 29 0d 09 09 09 74 68 65 |xTraps()|)....the|
|00004df0| 54 72 61 70 20 3d 20 5f | 55 6e 69 6d 70 6c 65 6d |Trap = _|Unimplem|
|00004e00| 65 6e 74 65 64 3b 0d 09 | 09 7d 0d 09 72 65 74 75 |ented;..|.}..retu|
|00004e10| 72 6e 28 4e 47 65 74 54 | 72 61 70 41 64 64 72 65 |rn(NGetT|rapAddre|
|00004e20| 73 73 28 74 68 65 54 72 | 61 70 2c 20 74 54 79 70 |ss(theTr|ap, tTyp|
|00004e30| 65 29 20 21 3d 20 4e 47 | 65 74 54 72 61 70 41 64 |e) != NG|etTrapAd|
|00004e40| 64 72 65 73 73 28 5f 55 | 6e 69 6d 70 6c 65 6d 65 |dress(_U|nimpleme|
|00004e50| 6e 74 65 64 2c 20 54 6f | 6f 6c 54 72 61 70 29 29 |nted, To|olTrap))|
|00004e60| 3b 0d 09 7d 0d 0d 2f 2a | 20 2a 2f 0d 54 72 61 70 |;..}../*| */.Trap|
|00004e70| 54 79 70 65 20 47 65 74 | 54 72 61 70 54 79 70 65 |Type Get|TrapType|
|00004e80| 28 73 68 6f 72 74 20 74 | 68 65 54 72 61 70 29 0d |(short t|heTrap).|
|00004e90| 09 7b 0d 09 69 66 20 28 | 28 74 68 65 54 72 61 70 |.{..if (|(theTrap|
|00004ea0| 20 26 20 30 78 30 38 30 | 30 29 20 3e 20 30 29 0d | & 0x080|0) > 0).|
|00004eb0| 09 09 72 65 74 75 72 6e | 20 54 6f 6f 6c 54 72 61 |..return| ToolTra|
|00004ec0| 70 3b 0d 09 72 65 74 75 | 72 6e 20 4f 53 54 72 61 |p;..retu|rn OSTra|
|00004ed0| 70 3b 0d 09 7d 0d 0d 2f | 2a 20 2a 2f 0d 73 68 6f |p;..}../|* */.sho|
|00004ee0| 72 74 20 4e 75 6d 54 6f | 6f 6c 62 6f 78 54 72 61 |rt NumTo|olboxTra|
|00004ef0| 70 73 28 29 0d 09 7b 0d | 09 69 66 20 28 4e 47 65 |ps()..{.|.if (NGe|
|00004f00| 74 54 72 61 70 41 64 64 | 72 65 73 73 28 5f 49 6e |tTrapAdd|ress(_In|
|00004f10| 69 74 47 72 61 66 2c 20 | 54 6f 6f 6c 54 72 61 70 |itGraf, |ToolTrap|
|00004f20| 29 0d 09 09 3d 3d 20 4e | 47 65 74 54 72 61 70 41 |)...== N|GetTrapA|
|00004f30| 64 64 72 65 73 73 28 30 | 78 41 41 36 45 2c 20 54 |ddress(0|xAA6E, T|
|00004f40| 6f 6f 6c 54 72 61 70 29 | 29 0d 09 09 72 65 74 75 |oolTrap)|)...retu|
|00004f50| 72 6e 20 30 78 30 32 30 | 30 3b 0d 09 72 65 74 75 |rn 0x020|0;..retu|
|00004f60| 72 6e 20 30 78 30 34 30 | 30 3b 0d 09 7d 0d 0d 76 |rn 0x040|0;..}..v|
|00004f70| 6f 69 64 20 41 45 49 6e | 73 74 61 6c 6c 45 76 65 |oid AEIn|stallEve|
|00004f80| 6e 74 48 61 6e 64 6c 65 | 72 73 28 29 0d 09 7b 0d |ntHandle|rs()..{.|
|00004f90| 09 41 45 45 76 65 6e 74 | 48 61 6e 64 6c 65 72 55 |.AEEvent|HandlerU|
|00004fa0| 50 50 20 61 48 61 6e 64 | 6c 65 72 3b 0d 09 0d 09 |PP aHand|ler;....|
|00004fb0| 61 48 61 6e 64 6c 65 72 | 20 3d 20 4e 65 77 41 45 |aHandler| = NewAE|
|00004fc0| 45 76 65 6e 74 48 61 6e | 64 6c 65 72 50 72 6f 63 |EventHan|dlerProc|
|00004fd0| 28 48 61 6e 64 6c 65 5f | 61 65 76 74 5f 6f 61 70 |(Handle_|aevt_oap|
|00004fe0| 70 29 3b 0d 09 41 45 49 | 6e 73 74 61 6c 6c 45 76 |p);..AEI|nstallEv|
|00004ff0| 65 6e 74 48 61 6e 64 6c | 65 72 28 6b 43 6f 72 65 |entHandl|er(kCore|
|00005000| 45 76 65 6e 74 43 6c 61 | 73 73 2c 20 6b 41 45 4f |EventCla|ss, kAEO|
|00005010| 70 65 6e 41 70 70 6c 69 | 63 61 74 69 6f 6e 2c 0d |penAppli|cation,.|
|00005020| 09 09 61 48 61 6e 64 6c | 65 72 2c 20 30 4c 2c 20 |..aHandl|er, 0L, |
|00005030| 46 41 4c 53 45 29 3b 0d | 09 61 48 61 6e 64 6c 65 |FALSE);.|.aHandle|
|00005040| 72 20 3d 20 4e 65 77 41 | 45 45 76 65 6e 74 48 61 |r = NewA|EEventHa|
|00005050| 6e 64 6c 65 72 50 72 6f | 63 28 48 61 6e 64 6c 65 |ndlerPro|c(Handle|
|00005060| 5f 61 65 76 74 5f 6f 64 | 6f 63 29 3b 0d 09 41 45 |_aevt_od|oc);..AE|
|00005070| 49 6e 73 74 61 6c 6c 45 | 76 65 6e 74 48 61 6e 64 |InstallE|ventHand|
|00005080| 6c 65 72 28 6b 43 6f 72 | 65 45 76 65 6e 74 43 6c |ler(kCor|eEventCl|
|00005090| 61 73 73 2c 20 6b 41 45 | 4f 70 65 6e 44 6f 63 75 |ass, kAE|OpenDocu|
|000050a0| 6d 65 6e 74 73 2c 0d 09 | 09 61 48 61 6e 64 6c 65 |ments,..|.aHandle|
|000050b0| 72 2c 20 30 4c 2c 20 46 | 41 4c 53 45 29 3b 0d 09 |r, 0L, F|ALSE);..|
|000050c0| 61 48 61 6e 64 6c 65 72 | 20 3d 20 4e 65 77 41 45 |aHandler| = NewAE|
|000050d0| 45 76 65 6e 74 48 61 6e | 64 6c 65 72 50 72 6f 63 |EventHan|dlerProc|
|000050e0| 28 48 61 6e 64 6c 65 5f | 61 65 76 74 5f 70 64 6f |(Handle_|aevt_pdo|
|000050f0| 63 29 3b 0d 09 41 45 49 | 6e 73 74 61 6c 6c 45 76 |c);..AEI|nstallEv|
|00005100| 65 6e 74 48 61 6e 64 6c | 65 72 28 6b 43 6f 72 65 |entHandl|er(kCore|
|00005110| 45 76 65 6e 74 43 6c 61 | 73 73 2c 20 6b 41 45 50 |EventCla|ss, kAEP|
|00005120| 72 69 6e 74 44 6f 63 75 | 6d 65 6e 74 73 2c 0d 09 |rintDocu|ments,..|
|00005130| 09 61 48 61 6e 64 6c 65 | 72 2c 20 30 4c 2c 20 46 |.aHandle|r, 0L, F|
|00005140| 41 4c 53 45 29 3b 0d 09 | 61 48 61 6e 64 6c 65 72 |ALSE);..|aHandler|
|00005150| 20 3d 20 4e 65 77 41 45 | 45 76 65 6e 74 48 61 6e | = NewAE|EventHan|
|00005160| 64 6c 65 72 50 72 6f 63 | 28 48 61 6e 64 6c 65 5f |dlerProc|(Handle_|
|00005170| 61 65 76 74 5f 71 75 69 | 74 29 3b 0d 09 41 45 49 |aevt_qui|t);..AEI|
|00005180| 6e 73 74 61 6c 6c 45 76 | 65 6e 74 48 61 6e 64 6c |nstallEv|entHandl|
|00005190| 65 72 28 6b 43 6f 72 65 | 45 76 65 6e 74 43 6c 61 |er(kCore|EventCla|
|000051a0| 73 73 2c 20 6b 41 45 51 | 75 69 74 41 70 70 6c 69 |ss, kAEQ|uitAppli|
|000051b0| 63 61 74 69 6f 6e 2c 0d | 09 09 61 48 61 6e 64 6c |cation,.|..aHandl|
|000051c0| 65 72 2c 20 30 4c 2c 20 | 46 41 4c 53 45 29 3b 0d |er, 0L, |FALSE);.|
|000051d0| 09 7d 0d 0d 76 6f 69 64 | 20 53 65 65 49 66 44 41 |.}..void| SeeIfDA|
|000051e0| 49 73 46 72 6f 6e 74 57 | 69 6e 64 6f 77 28 29 0d |IsFrontW|indow().|
|000051f0| 09 7b 0d 09 57 69 6e 64 | 6f 77 50 65 65 6b 09 77 |.{..Wind|owPeek.w|
|00005200| 50 20 3d 20 28 57 69 6e | 64 6f 77 50 65 65 6b 29 |P = (Win|dowPeek)|
|00005210| 46 72 6f 6e 74 57 69 6e | 64 6f 77 28 29 3b 0d 09 |FrontWin|dow();..|
|00005220| 0d 09 69 66 20 28 77 50 | 20 26 26 20 28 77 50 2d |..if (wP| && (wP-|
|00005230| 3e 77 69 6e 64 6f 77 4b | 69 6e 64 20 3c 20 30 29 |>windowK|ind < 0)|
|00005240| 29 0d 09 09 64 61 49 6e | 46 72 6f 6e 74 20 3d 20 |)...daIn|Front = |
|00005250| 54 52 55 45 3b 0d 09 65 | 6c 73 65 20 69 66 20 28 |TRUE;..e|lse if (|
|00005260| 64 61 49 6e 46 72 6f 6e | 74 29 0d 09 09 7b 0d 09 |daInFron|t)...{..|
|00005270| 09 64 61 49 6e 46 72 6f | 6e 74 20 3d 20 46 41 4c |.daInFro|nt = FAL|
|00005280| 53 45 3b 0d 09 09 2f 2a | 43 6f 6e 76 65 72 74 53 |SE;.../*|ConvertS|
|00005290| 63 72 61 70 49 66 43 68 | 61 6e 67 65 64 28 29 3b |crapIfCh|anged();|
|000052a0| 20 2d 20 6e 6f 74 20 69 | 6d 70 6c 65 6d 65 6e 74 | - not i|mplement|
|000052b0| 65 64 20 2a 2f 0d 09 09 | 7d 0d 09 7d 0d 0d 2f 2a |ed */...|}..}../*|
|000052c0| 2a 2a 2a 2a 2a 2a 2a 2a | 20 46 6f 72 20 72 75 6e |********| For run|
|000052d0| 6e 69 6e 67 20 44 72 61 | 67 5f 6f 6e 27 73 20 63 |ning Dra|g_on's c|
|000052e0| 6f 6e 63 75 72 72 65 6e | 74 6c 79 2c 20 74 68 65 |oncurren|tly, the|
|000052f0| 20 63 61 6c 6c 69 6e 67 | 20 61 70 70 6c 69 63 61 | calling| applica|
|00005300| 74 69 6f 6e 0d 28 68 65 | 72 65 20 4d 69 6e 69 6d |tion.(he|re Minim|
|00005310| 61 6c 20 41 70 70 29 20 | 68 61 6e 64 6c 65 73 20 |al App) |handles |
|00005320| 61 6c 6c 20 74 68 65 20 | 65 76 65 6e 74 73 20 77 |all the |events w|
|00005330| 68 69 6c 65 20 74 68 65 | 20 44 72 61 67 5f 6f 6e |hile the| Drag_on|
|00005340| 20 63 68 75 67 73 20 61 | 77 61 79 2e 0d 4e 6f 74 | chugs a|way..Not|
|00005350| 65 20 74 68 61 74 20 71 | 75 69 74 74 69 6e 67 20 |e that q|uitting |
|00005360| 74 68 69 73 20 61 70 70 | 20 77 69 74 68 20 61 20 |this app| with a |
|00005370| 51 75 69 74 20 66 72 6f | 6d 20 74 68 65 20 6d 65 |Quit fro|m the me|
|00005380| 6e 75 20 6f 72 20 61 6e | 20 41 45 76 65 6e 74 0d |nu or an| AEvent.|
|00005390| 66 6f 72 63 65 73 20 74 | 68 65 20 68 41 57 4b 20 |forces t|he hAWK |
|000053a0| 70 72 6f 67 72 61 6d 20 | 74 6f 20 74 65 72 6d 69 |program |to termi|
|000053b0| 6e 61 74 65 2e 0d 2a 2f | 0d 76 6f 69 64 20 48 61 |nate..*/|.void Ha|
|000053c0| 6e 64 6c 65 4f 6e 65 45 | 76 65 6e 74 28 29 0d 09 |ndleOneE|vent()..|
|000053d0| 7b 0d 09 50 6f 69 6e 74 | 09 09 77 68 65 72 65 3b |{..Point|..where;|
|000053e0| 0d 09 42 6f 6f 6c 65 61 | 6e 09 09 67 6f 74 45 76 |..Boolea|n..gotEv|
|000053f0| 65 6e 74 3b 0d 09 73 68 | 6f 72 74 09 09 70 61 72 |ent;..sh|ort..par|
|00005400| 74 3b 0d 09 0d 09 2f 2a | 20 72 65 67 75 6c 61 72 |t;..../*| regular|
|00005410| 20 70 6f 6c 6c 69 6e 67 | 20 67 6f 65 73 20 68 65 | polling| goes he|
|00005420| 72 65 20 2a 2f 0d 09 53 | 65 65 49 66 44 41 49 73 |re */..S|eeIfDAIs|
|00005430| 46 72 6f 6e 74 57 69 6e | 64 6f 77 28 29 3b 0d 09 |FrontWin|dow();..|
|00005440| 69 66 20 28 67 49 6e 42 | 61 63 6b 67 72 6f 75 6e |if (gInB|ackgroun|
|00005450| 64 29 0d 09 09 7b 0d 09 | 09 2f 2a 20 68 61 6e 64 |d)...{..|./* hand|
|00005460| 6c 65 20 62 65 69 6e 67 | 20 69 6e 20 74 68 65 20 |le being| in the |
|00005470| 62 61 63 6b 67 72 6f 75 | 6e 64 20 2a 2f 0d 09 09 |backgrou|nd */...|
|00005480| 3b 0d 09 09 7d 0d 09 0d | 09 67 6f 74 45 76 65 6e |;...}...|.gotEven|
|00005490| 74 20 3d 20 57 61 69 74 | 4e 65 78 74 45 76 65 6e |t = Wait|NextEven|
|000054a0| 74 28 65 76 65 72 79 45 | 76 65 6e 74 2c 20 26 67 |t(everyE|vent, &g|
|000054b0| 45 76 74 44 65 74 61 69 | 6c 73 2e 65 76 65 6e 74 |EvtDetai|ls.event|
|000054c0| 2c 20 47 65 74 53 6c 65 | 65 70 28 29 2c 20 63 75 |, GetSle|ep(), cu|
|000054d0| 72 73 6f 72 52 67 6e 29 | 3b 0d 09 69 66 20 28 67 |rsorRgn)|;..if (g|
|000054e0| 6f 74 45 76 65 6e 74 29 | 0d 09 09 7b 0d 09 09 53 |otEvent)|...{...S|
|000054f0| 65 74 45 76 65 6e 74 44 | 65 74 61 69 6c 73 28 29 |etEventD|etails()|
|00005500| 3b 0d 0d 09 09 41 64 6a | 75 73 74 43 75 72 73 6f |;....Adj|ustCurso|
|00005510| 72 28 67 45 76 74 44 65 | 74 61 69 6c 73 2e 65 76 |r(gEvtDe|tails.ev|
|00005520| 65 6e 74 2e 77 68 65 72 | 65 2c 20 63 75 72 73 6f |ent.wher|e, curso|
|00005530| 72 52 67 6e 29 3b 0d 09 | 09 0d 09 09 69 66 20 28 |rRgn);..|....if (|
|00005540| 49 73 44 69 61 6c 6f 67 | 45 76 65 6e 74 28 26 67 |IsDialog|Event(&g|
|00005550| 45 76 74 44 65 74 61 69 | 6c 73 2e 65 76 65 6e 74 |EvtDetai|ls.event|
|00005560| 29 29 0d 09 09 09 48 61 | 6e 64 6c 65 4d 6f 64 65 |))....Ha|ndleMode|
|00005570| 6c 65 73 73 44 69 61 6c | 6f 67 28 29 3b 0d 09 09 |lessDial|og();...|
|00005580| 65 6c 73 65 0d 09 09 09 | 7b 0d 09 09 09 73 77 69 |else....|{....swi|
|00005590| 74 63 68 20 28 67 45 76 | 74 44 65 74 61 69 6c 73 |tch (gEv|tDetails|
|000055a0| 2e 65 76 65 6e 74 2e 77 | 68 61 74 29 0d 09 09 09 |.event.w|hat)....|
|000055b0| 09 7b 0d 09 09 09 63 61 | 73 65 20 6d 6f 75 73 65 |.{....ca|se mouse|
|000055c0| 44 6f 77 6e 3a 0d 09 09 | 09 09 73 77 69 74 63 68 |Down:...|..switch|
|000055d0| 20 28 70 61 72 74 20 3d | 20 46 69 6e 64 57 69 6e | (part =| FindWin|
|000055e0| 64 6f 77 28 67 45 76 74 | 44 65 74 61 69 6c 73 2e |dow(gEvt|Details.|
|000055f0| 65 76 65 6e 74 2e 77 68 | 65 72 65 2c 0d 09 09 09 |event.wh|ere,....|
|00005600| 09 09 09 09 09 26 67 45 | 76 74 44 65 74 61 69 6c |.....&gE|vtDetail|
|00005610| 73 2e 6d 6f 75 73 65 44 | 6f 77 6e 57 69 6e 64 6f |s.mouseD|ownWindo|
|00005620| 77 29 29 20 0d 09 09 09 | 09 09 7b 0d 09 09 09 09 |w)) ....|..{.....|
|00005630| 63 61 73 65 20 69 6e 44 | 65 73 6b 3a 20 0d 09 09 |case inD|esk: ...|
|00005640| 09 09 09 53 79 73 42 65 | 65 70 28 32 29 3b 0d 09 |...SysBe|ep(2);..|
|00005650| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 09 09 63 61 |...break|;.....ca|
|00005660| 73 65 20 69 6e 4d 65 6e | 75 42 61 72 3a 0d 09 09 |se inMen|uBar:...|
|00005670| 09 09 09 2f 2f 20 49 66 | 20 77 65 20 67 6f 2c 20 |...// If| we go, |
|00005680| 68 41 57 4b 20 67 6f 65 | 73 20 74 6f 6f 2e 0d 09 |hAWK goe|s too...|
|00005690| 09 09 09 09 67 51 75 69 | 74 74 69 6e 67 20 3d 20 |....gQui|tting = |
|000056a0| 44 6f 4d 65 6e 75 28 4d | 65 6e 75 53 65 6c 65 63 |DoMenu(M|enuSelec|
|000056b0| 74 28 67 45 76 74 44 65 | 74 61 69 6c 73 2e 65 76 |t(gEvtDe|tails.ev|
|000056c0| 65 6e 74 2e 77 68 65 72 | 65 29 29 3b 0d 09 09 09 |ent.wher|e));....|
|000056d0| 09 63 61 73 65 20 69 6e | 53 79 73 57 69 6e 64 6f |.case in|SysWindo|
|000056e0| 77 3a 0d 09 09 09 09 09 | 53 79 73 74 65 6d 43 6c |w:......|SystemCl|
|000056f0| 69 63 6b 28 26 67 45 76 | 74 44 65 74 61 69 6c 73 |ick(&gEv|tDetails|
|00005700| 2e 65 76 65 6e 74 2c 20 | 67 45 76 74 44 65 74 61 |.event, |gEvtDeta|
|00005710| 69 6c 73 2e 6d 6f 75 73 | 65 44 6f 77 6e 57 69 6e |ils.mous|eDownWin|
|00005720| 64 6f 77 29 3b 0d 09 09 | 09 09 62 72 65 61 6b 3b |dow);...|..break;|
|00005730| 0d 09 09 09 09 63 61 73 | 65 20 69 6e 44 72 61 67 |.....cas|e inDrag|
|00005740| 3a 0d 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |:.....br|eak;....|
|00005750| 09 63 61 73 65 20 69 6e | 5a 6f 6f 6d 49 6e 3a 0d |.case in|ZoomIn:.|
|00005760| 09 09 09 09 63 61 73 65 | 20 69 6e 5a 6f 6f 6d 4f |....case| inZoomO|
|00005770| 75 74 3a 0d 09 09 09 09 | 62 72 65 61 6b 3b 0d 09 |ut:.....|break;..|
|00005780| 09 09 09 63 61 73 65 20 | 69 6e 47 72 6f 77 3a 0d |...case |inGrow:.|
|00005790| 09 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 09 09 63 |....brea|k;.....c|
|000057a0| 61 73 65 20 69 6e 47 6f | 41 77 61 79 3a 0d 09 09 |ase inGo|Away:...|
|000057b0| 09 09 62 72 65 61 6b 3b | 0d 09 09 09 09 63 61 73 |..break;|.....cas|
|000057c0| 65 20 69 6e 43 6f 6e 74 | 65 6e 74 3a 0d 09 09 09 |e inCont|ent:....|
|000057d0| 09 62 72 65 61 6b 3b 0d | 09 09 09 09 64 65 66 61 |.break;.|....defa|
|000057e0| 75 6c 74 3a 20 0d 09 09 | 09 09 62 72 65 61 6b 3b |ult: ...|..break;|
|000057f0| 0d 09 09 09 09 09 7d 20 | 2f 2a 20 73 77 69 74 63 |......} |/* switc|
|00005800| 68 20 46 69 6e 64 57 69 | 6e 64 6f 77 20 2a 2f 0d |h FindWi|ndow */.|
|00005810| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 09 63 61 73 |...break|;....cas|
|00005820| 65 20 6b 65 79 44 6f 77 | 6e 3a 0d 09 09 09 63 61 |e keyDow|n:....ca|
|00005830| 73 65 20 61 75 74 6f 4b | 65 79 3a 0d 09 09 09 09 |se autoK|ey:.....|
|00005840| 0d 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 09 63 61 |....brea|k;....ca|
|00005850| 73 65 20 75 70 64 61 74 | 65 45 76 74 3a 0d 09 09 |se updat|eEvt:...|
|00005860| 09 09 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |......br|eak;....|
|00005870| 63 61 73 65 20 64 69 73 | 6b 45 76 74 3a 0d 09 09 |case dis|kEvt:...|
|00005880| 09 09 69 66 20 28 48 69 | 57 6f 72 64 28 67 45 76 |..if (Hi|Word(gEv|
|00005890| 74 44 65 74 61 69 6c 73 | 2e 65 76 65 6e 74 2e 6d |tDetails|.event.m|
|000058a0| 65 73 73 61 67 65 29 20 | 21 3d 20 6e 6f 45 72 72 |essage) |!= noErr|
|000058b0| 29 0d 09 09 09 09 09 7b | 0d 09 09 09 09 09 44 49 |)......{|......DI|
|000058c0| 4c 6f 61 64 28 29 3b 0d | 09 09 09 09 09 77 68 65 |Load();.|.....whe|
|000058d0| 72 65 2e 68 20 3d 20 77 | 68 65 72 65 2e 76 20 3d |re.h = w|here.v =|
|000058e0| 20 38 35 3b 0d 09 09 09 | 09 09 44 49 42 61 64 4d | 85;....|..DIBadM|
|000058f0| 6f 75 6e 74 28 77 68 65 | 72 65 2c 20 67 45 76 74 |ount(whe|re, gEvt|
|00005900| 44 65 74 61 69 6c 73 2e | 65 76 65 6e 74 2e 6d 65 |Details.|event.me|
|00005910| 73 73 61 67 65 29 3b 0d | 09 09 09 09 09 7d 0d 09 |ssage);.|.....}..|
|00005920| 09 09 62 72 65 61 6b 3b | 0d 09 09 09 63 61 73 65 |..break;|....case|
|00005930| 20 61 63 74 69 76 61 74 | 65 45 76 74 3a 0d 09 09 | activat|eEvt:...|
|00005940| 09 09 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |......br|eak;....|
|00005950| 63 61 73 65 20 6b 4f 53 | 45 76 65 6e 74 3a 0d 09 |case kOS|Event:..|
|00005960| 09 09 09 73 77 69 74 63 | 68 28 28 67 45 76 74 44 |...switc|h((gEvtD|
|00005970| 65 74 61 69 6c 73 2e 65 | 76 65 6e 74 2e 6d 65 73 |etails.e|vent.mes|
|00005980| 73 61 67 65 20 3e 3e 20 | 32 34 29 20 26 20 30 78 |sage >> |24) & 0x|
|00005990| 66 66 29 0d 09 09 09 09 | 09 7b 0d 09 09 09 09 63 |ff).....|.{.....c|
|000059a0| 61 73 65 20 6d 6f 75 73 | 65 4d 6f 76 65 64 4d 65 |ase mous|eMovedMe|
|000059b0| 73 73 61 67 65 3a 0d 09 | 09 09 09 09 42 6c 69 6e |ssage:..|....Blin|
|000059c0| 6b 54 65 78 74 43 75 72 | 73 6f 72 28 29 3b 0d 09 |kTextCur|sor();..|
|000059d0| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 09 09 63 61 |...break|;.....ca|
|000059e0| 73 65 20 73 75 73 70 65 | 6e 64 52 65 73 75 6d 65 |se suspe|ndResume|
|000059f0| 4d 65 73 73 61 67 65 3a | 0d 09 09 09 09 09 67 49 |Message:|......gI|
|00005a00| 6e 42 61 63 6b 67 72 6f | 75 6e 64 20 3d 20 28 67 |nBackgro|und = (g|
|00005a10| 45 76 74 44 65 74 61 69 | 6c 73 2e 65 76 65 6e 74 |EvtDetai|ls.event|
|00005a20| 2e 6d 65 73 73 61 67 65 | 20 26 20 72 65 73 75 6d |.message| & resum|
|00005a30| 65 46 6c 61 67 29 20 3d | 3d 20 30 3b 0d 09 09 09 |eFlag) =|= 0;....|
|00005a40| 09 62 72 65 61 6b 3b 0d | 09 09 09 09 09 7d 0d 09 |.break;.|.....}..|
|00005a50| 09 09 62 72 65 61 6b 3b | 0d 09 09 09 63 61 73 65 |..break;|....case|
|00005a60| 20 6b 48 69 67 68 4c 65 | 76 65 6c 45 76 65 6e 74 | kHighLe|velEvent|
|00005a70| 3a 0d 09 09 09 09 41 45 | 50 72 6f 63 65 73 73 41 |:.....AE|ProcessA|
|00005a80| 70 70 6c 65 45 76 65 6e | 74 28 26 67 45 76 74 44 |ppleEven|t(&gEvtD|
|00005a90| 65 74 61 69 6c 73 2e 65 | 76 65 6e 74 29 3b 0d 09 |etails.e|vent);..|
|00005aa0| 09 09 62 72 65 61 6b 3b | 0d 09 09 09 09 7d 20 2f |..break;|.....} /|
|00005ab0| 2a 20 73 77 69 74 63 68 | 20 2a 2f 0d 09 09 09 7d |* switch| */....}|
|00005ac0| 20 2f 2a 20 6e 6f 74 20 | 6d 6f 64 65 6c 65 73 73 | /* not |modeless|
|00005ad0| 20 64 69 61 6c 6f 67 20 | 2a 2f 0d 09 09 7d 20 2f | dialog |*/...} /|
|00005ae0| 2a 20 69 66 20 67 6f 74 | 20 65 76 65 6e 74 20 2a |* if got| event *|
|00005af0| 2f 0d 09 65 6c 73 65 0d | 09 09 42 6c 69 6e 6b 54 |/..else.|..BlinkT|
|00005b00| 65 78 74 43 75 72 73 6f | 72 28 29 3b 0d 09 41 64 |extCurso|r();..Ad|
|00005b10| 6a 75 73 74 43 75 72 73 | 6f 72 28 67 45 76 74 44 |justCurs|or(gEvtD|
|00005b20| 65 74 61 69 6c 73 2e 65 | 76 65 6e 74 2e 77 68 65 |etails.e|vent.whe|
|00005b30| 72 65 2c 20 63 75 72 73 | 6f 72 52 67 6e 29 3b 0d |re, curs|orRgn);.|
|00005b40| 09 7d 0d 0d 2f 2a 20 52 | 75 6e 20 68 41 57 4b 20 |.}../* R|un hAWK |
|00005b50| 70 72 6f 67 72 61 6d 20 | 61 74 20 73 74 61 72 74 |program |at start|
|00005b60| 75 70 20 69 66 20 74 68 | 65 72 65 20 69 73 20 61 |up if th|ere is a|
|00005b70| 20 63 6f 6d 6d 61 6e 64 | 20 6c 69 6e 65 20 6f 6e | command| line on|
|00005b80| 20 74 68 65 20 63 6c 69 | 70 62 6f 61 72 64 2e 0d | the cli|pboard..|
|00005b90| 2a 2f 0d 42 6f 6f 6c 65 | 61 6e 20 46 69 72 65 4f |*/.Boole|an FireO|
|00005ba0| 66 66 48 61 77 6b 50 72 | 6f 67 72 61 6d 28 76 6f |ffHawkPr|ogram(vo|
|00005bb0| 69 64 29 0d 09 7b 0d 09 | 4d 65 6e 75 48 61 6e 64 |id)..{..|MenuHand|
|00005bc0| 6c 65 20 09 09 6d 65 6e | 75 3b 0d 09 53 74 72 32 |le ..men|u;..Str2|
|00005bd0| 35 35 09 09 09 6e 61 6d | 65 3b 0d 09 73 68 6f 72 |55...nam|e;..shor|
|00005be0| 74 09 09 09 6e 75 6d 49 | 74 65 6d 73 3b 0d 09 73 |t...numI|tems;..s|
|00005bf0| 68 6f 72 74 09 09 09 69 | 3b 0d 09 42 6f 6f 6c 65 |hort...i|;..Boole|
|00005c00| 61 6e 09 09 09 72 65 73 | 75 6c 74 20 3d 20 46 41 |an...res|ult = FA|
|00005c10| 4c 53 45 3b 0d 09 0d 09 | 2f 2f 20 49 73 20 68 41 |LSE;....|// Is hA|
|00005c20| 57 4b 20 61 76 61 69 6c | 61 62 6c 65 3f 0d 09 6d |WK avail|able?..m|
|00005c30| 65 6e 75 20 3d 20 47 65 | 74 4d 48 61 6e 64 6c 65 |enu = Ge|tMHandle|
|00005c40| 28 45 44 49 54 49 44 29 | 3b 0d 09 69 66 20 28 6d |(EDITID)|;..if (m|
|00005c50| 65 6e 75 20 21 3d 20 4e | 55 4c 4c 29 0d 09 09 7b |enu != N|ULL)...{|
|00005c60| 0d 09 09 6e 75 6d 49 74 | 65 6d 73 20 3d 20 43 6f |...numIt|ems = Co|
|00005c70| 75 6e 74 4d 49 74 65 6d | 73 28 6d 65 6e 75 29 3b |untMItem|s(menu);|
|00005c80| 0d 09 09 66 6f 72 20 28 | 69 20 3d 20 37 3b 20 69 |...for (|i = 7; i|
|00005c90| 20 3c 3d 20 6e 75 6d 49 | 74 65 6d 73 3b 20 2b 2b | <= numI|tems; ++|
|00005ca0| 69 29 0d 09 09 09 7b 0d | 09 09 09 47 65 74 49 74 |i)....{.|...GetIt|
|00005cb0| 65 6d 28 6d 65 6e 75 2c | 20 69 2c 20 6e 61 6d 65 |em(menu,| i, name|
|00005cc0| 29 3b 0d 09 09 09 69 66 | 20 28 20 6e 61 6d 65 5b |);....if| ( name[|
|00005cd0| 30 5d 20 3d 3d 20 34 0d | 09 09 09 20 20 26 26 20 |0] == 4.|... && |
|00005ce0| 6e 61 6d 65 5b 31 5d 20 | 3d 3d 20 27 68 27 0d 09 |name[1] |== 'h'..|
|00005cf0| 09 09 20 20 26 26 20 6e | 61 6d 65 5b 32 5d 20 3d |.. && n|ame[2] =|
|00005d00| 3d 20 27 41 27 0d 09 09 | 09 20 20 26 26 20 6e 61 |= 'A'...|. && na|
|00005d10| 6d 65 5b 33 5d 20 3d 3d | 20 27 57 27 0d 09 09 09 |me[3] ==| 'W'....|
|00005d20| 20 20 26 26 20 6e 61 6d | 65 5b 34 5d 20 3d 3d 20 | && nam|e[4] == |
|00005d30| 27 4b 27 20 29 0d 09 09 | 09 09 7b 0d 09 09 09 09 |'K' )...|..{.....|
|00005d40| 50 74 72 09 09 63 6f 6d | 6d 61 6e 64 4c 69 6e 65 |Ptr..com|mandLine|
|00005d50| 50 3b 0d 09 09 09 09 0d | 09 09 09 09 63 6f 6d 6d |P;......|....comm|
|00005d60| 61 6e 64 4c 69 6e 65 50 | 20 3d 20 47 65 74 43 6f |andLineP| = GetCo|
|00005d70| 6d 6d 61 6e 64 4c 69 6e | 65 46 72 6f 6d 53 63 72 |mmandLin|eFromScr|
|00005d80| 61 70 28 29 3b 0d 09 09 | 09 09 69 66 20 28 63 6f |ap();...|..if (co|
|00005d90| 6d 6d 61 6e 64 4c 69 6e | 65 50 20 21 3d 20 4e 55 |mmandLin|eP != NU|
|00005da0| 4c 4c 29 0d 09 09 09 09 | 09 7b 0d 09 09 09 09 09 |LL).....|.{......|
|00005db0| 4b 65 79 4d 61 70 09 09 | 6b 3b 0d 09 09 09 09 09 |KeyMap..|k;......|
|00005dc0| 42 6f 6f 6c 65 61 6e 09 | 09 73 68 69 66 74 49 73 |Boolean.|.shiftIs|
|00005dd0| 44 6f 77 6e 3b 0d 09 09 | 09 09 09 42 6f 6f 6c 65 |Down;...|...Boole|
|00005de0| 61 6e 09 09 6f 70 74 69 | 6f 6e 49 73 44 6f 77 6e |an..opti|onIsDown|
|00005df0| 3b 0d 09 09 09 09 09 0d | 09 09 09 09 09 47 65 74 |;.......|.....Get|
|00005e00| 4b 65 79 73 28 6b 29 3b | 0d 09 09 09 09 09 69 66 |Keys(k);|......if|
|00005e10| 20 28 42 69 74 54 73 74 | 28 26 28 6b 5b 30 5d 29 | (BitTst|(&(k[0])|
|00005e20| 2c 20 36 31 29 29 0d 09 | 09 09 09 09 09 6f 70 74 |, 61))..|.....opt|
|00005e30| 69 6f 6e 49 73 44 6f 77 | 6e 20 3d 20 54 52 55 45 |ionIsDow|n = TRUE|
|00005e40| 3b 0d 09 09 09 09 09 69 | 66 20 28 42 69 74 54 73 |;......i|f (BitTs|
|00005e50| 74 28 26 28 6b 5b 30 5d | 29 2c 20 36 33 29 29 0d |t(&(k[0]|), 63)).|
|00005e60| 09 09 09 09 09 09 73 68 | 69 66 74 49 73 44 6f 77 |......sh|iftIsDow|
|00005e70| 6e 20 3d 20 54 52 55 45 | 3b 0d 09 09 09 09 09 43 |n = TRUE|;......C|
|00005e80| 61 6c 6c 52 65 73 6f 75 | 72 63 65 28 20 45 44 49 |allResou|rce( EDI|
|00005e90| 54 49 44 2c 0d 09 09 09 | 09 09 09 09 09 20 20 69 |TID,....|..... i|
|00005ea0| 2c 0d 09 09 09 09 09 09 | 09 09 20 20 21 73 68 69 |,.......|.. !shi|
|00005eb0| 66 74 49 73 44 6f 77 6e | 20 26 26 20 21 6f 70 74 |ftIsDown| && !opt|
|00005ec0| 69 6f 6e 49 73 44 6f 77 | 6e 2c 0d 09 09 09 09 09 |ionIsDow|n,......|
|00005ed0| 09 09 09 20 20 63 6f 6d | 6d 61 6e 64 4c 69 6e 65 |... com|mandLine|
|00005ee0| 50 20 29 3b 0d 09 09 09 | 09 09 44 69 73 70 6f 73 |P );....|..Dispos|
|00005ef0| 65 50 74 72 28 63 6f 6d | 6d 61 6e 64 4c 69 6e 65 |ePtr(com|mandLine|
|00005f00| 50 29 3b 0d 09 09 09 09 | 09 72 65 73 75 6c 74 20 |P);.....|.result |
|00005f10| 3d 20 54 52 55 45 3b 0d | 09 09 09 09 09 7d 0d 09 |= TRUE;.|.....}..|
|00005f20| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 09 09 7d 0d |...break|;.....}.|
|00005f30| 09 09 09 7d 0d 09 09 7d | 0d 09 72 65 74 75 72 6e |...}...}|..return|
|00005f40| 20 72 65 73 75 6c 74 3b | 0d 09 7d 0d 0d 2f 2a 20 | result;|..}../* |
|00005f50| 47 65 74 20 63 6f 6d 6d | 61 6e 64 20 6c 69 6e 65 |Get comm|and line|
|00005f60| 20 66 6f 72 20 68 41 57 | 4b 20 66 72 6f 6d 20 73 | for hAW|K from s|
|00005f70| 63 72 61 70 20 61 73 20 | 43 20 73 74 72 69 6e 67 |crap as |C string|
|00005f80| 2c 20 6f 72 20 72 65 74 | 75 72 6e 20 4e 55 4c 4c |, or ret|urn NULL|
|00005f90| 2e 0d 2a 2f 0d 63 68 61 | 72 20 2a 47 65 74 43 6f |..*/.cha|r *GetCo|
|00005fa0| 6d 6d 61 6e 64 4c 69 6e | 65 46 72 6f 6d 53 63 72 |mmandLin|eFromScr|
|00005fb0| 61 70 28 76 6f 69 64 29 | 0d 09 7b 0d 09 48 61 6e |ap(void)|..{..Han|
|00005fc0| 64 6c 65 09 09 09 73 63 | 72 61 70 54 65 78 74 48 |dle...sc|rapTextH|
|00005fd0| 3b 09 09 09 2f 2f 20 63 | 6f 70 79 20 6f 66 20 73 |;...// c|opy of s|
|00005fe0| 63 72 61 70 20 74 65 78 | 74 0d 09 63 68 61 72 09 |crap tex|t..char.|
|00005ff0| 09 09 6e 61 6d 65 5b 31 | 36 5d 3b 09 09 09 2f 2f |..name[1|6];...//|
|00006000| 20 66 6f 72 20 47 65 6e | 65 72 69 63 47 65 74 4e | for Gen|ericGetN|
|00006010| 61 6d 65 0d 09 73 68 6f | 72 74 09 09 09 6e 61 6d |ame..sho|rt...nam|
|00006020| 65 4c 65 6e 67 74 68 3b | 09 09 09 2f 2f 20 64 69 |eLength;|...// di|
|00006030| 74 74 6f 0d 09 6c 6f 6e | 67 09 09 09 6f 66 66 73 |tto..lon|g...offs|
|00006040| 65 74 3b 09 09 09 09 2f | 2f 20 69 6e 74 6f 20 73 |et;..../|/ into s|
|00006050| 63 72 61 70 0d 09 6c 6f | 6e 67 09 09 09 6e 75 6d |crap..lo|ng...num|
|00006060| 43 68 61 72 73 20 3d 20 | 30 3b 09 09 2f 2f 20 6e |Chars = |0;..// n|
|00006070| 75 6d 20 74 65 78 74 20 | 63 68 61 72 73 20 6f 6e |um text |chars on|
|00006080| 20 73 63 72 61 70 0d 09 | 6c 6f 6e 67 09 09 09 6f | scrap..|long...o|
|00006090| 6e 53 63 72 61 70 3b 0d | 09 50 74 72 09 09 09 09 |nScrap;.|.Ptr....|
|000060a0| 62 50 74 72 2c 09 09 09 | 09 2f 2f 20 73 74 61 72 |bPtr,...|.// star|
|000060b0| 74 20 6f 66 20 74 65 78 | 74 0d 09 09 09 09 09 63 |t of tex|t......c|
|000060c0| 50 74 72 2c 09 09 09 09 | 2f 2f 20 61 64 76 61 6e |Ptr,....|// advan|
|000060d0| 63 65 73 20 74 68 72 6f | 75 67 68 20 74 68 65 20 |ces thro|ugh the |
|000060e0| 74 65 78 74 0d 09 09 09 | 09 09 74 6f 70 50 74 72 |text....|..topPtr|
|000060f0| 3b 20 09 09 09 2f 2f 20 | 65 6e 64 20 6f 66 20 74 |; ...// |end of t|
|00006100| 65 78 74 0d 09 50 74 72 | 09 09 09 09 63 6f 6d 6d |ext..Ptr|....comm|
|00006110| 61 6e 64 4c 69 6e 65 50 | 20 3d 20 4e 55 4c 4c 3b |andLineP| = NULL;|
|00006120| 2f 2f 20 61 6c 6c 6f 63 | 61 74 65 64 20 63 6d 64 |// alloc|ated cmd|
|00006130| 20 6c 69 6e 65 20 6f 72 | 20 4e 55 4c 4c 0d 09 53 | line or| NULL..S|
|00006140| 63 72 61 70 53 74 75 66 | 66 20 09 09 2a 73 63 72 |crapStuf|f ..*scr|
|00006150| 61 70 53 74 75 66 66 3b | 0d 09 0d 09 73 63 72 61 |apStuff;|....scra|
|00006160| 70 53 74 75 66 66 20 3d | 20 49 6e 66 6f 53 63 72 |pStuff =| InfoScr|
|00006170| 61 70 28 29 3b 0d 09 0d | 09 73 63 72 61 70 54 65 |ap();...|.scrapTe|
|00006180| 78 74 48 20 3d 20 4e 65 | 77 48 61 6e 64 6c 65 28 |xtH = Ne|wHandle(|
|00006190| 30 29 3b 0d 09 69 66 20 | 28 73 63 72 61 70 54 65 |0);..if |(scrapTe|
|000061a0| 78 74 48 20 21 3d 20 4e | 55 4c 4c 29 0d 09 09 7b |xtH != N|ULL)...{|
|000061b0| 0d 09 09 6e 75 6d 43 68 | 61 72 73 20 3d 20 47 65 |...numCh|ars = Ge|
|000061c0| 74 53 63 72 61 70 28 73 | 63 72 61 70 54 65 78 74 |tScrap(s|crapText|
|000061d0| 48 2c 27 54 45 58 54 27 | 2c 26 6f 66 66 73 65 74 |H,'TEXT'|,&offset|
|000061e0| 29 3b 0d 09 09 69 66 20 | 28 6e 75 6d 43 68 61 72 |);...if |(numChar|
|000061f0| 73 20 3e 20 37 29 20 2f | 2f 20 22 68 41 57 4b 20 |s > 7) /|/ "hAWK |
|00006200| 2d 66 58 22 20 69 73 20 | 73 6d 61 6c 6c 65 73 74 |-fX" is |smallest|
|00006210| 20 63 6f 6d 6d 61 6e 64 | 20 6c 69 6e 65 2c 20 38 | command| line, 8|
|00006220| 20 63 68 61 72 73 0d 09 | 09 09 7b 0d 09 09 09 62 | chars..|..{....b|
|00006230| 50 74 72 20 3d 20 2a 73 | 63 72 61 70 54 65 78 74 |Ptr = *s|crapText|
|00006240| 48 3b 0d 09 09 09 63 50 | 74 72 20 3d 20 62 50 74 |H;....cP|tr = bPt|
|00006250| 72 3b 0d 09 09 09 74 6f | 70 50 74 72 20 3d 20 62 |r;....to|pPtr = b|
|00006260| 50 74 72 20 2b 20 6e 75 | 6d 43 68 61 72 73 3b 0d |Ptr + nu|mChars;.|
|00006270| 09 09 09 77 68 69 6c 65 | 20 28 2a 63 50 74 72 20 |...while| (*cPtr |
|00006280| 3d 3d 20 42 4c 41 4e 4b | 20 7c 7c 20 28 2a 63 50 |== BLANK| || (*cP|
|00006290| 74 72 20 3e 20 30 20 26 | 26 20 2a 63 50 74 72 20 |tr > 0 &|& *cPtr |
|000062a0| 3c 3d 20 43 52 29 0d 09 | 09 09 09 7c 7c 20 2a 63 |<= CR)..|...|| *c|
|000062b0| 50 74 72 20 3d 3d 20 4f | 50 54 42 4c 29 0d 09 09 |Ptr == O|PTBL)...|
|000062c0| 09 09 2b 2b 63 50 74 72 | 3b 0d 09 09 09 6e 61 6d |..++cPtr|;....nam|
|000062d0| 65 4c 65 6e 67 74 68 20 | 3d 20 31 35 3b 0d 09 09 |eLength |= 15;...|
|000062e0| 09 69 66 20 28 20 47 65 | 6e 65 72 69 63 47 65 74 |.if ( Ge|nericGet|
|000062f0| 4e 61 6d 65 28 26 63 50 | 74 72 2c 20 74 6f 70 50 |Name(&cP|tr, topP|
|00006300| 74 72 2c 20 6e 61 6d 65 | 2c 20 26 6e 61 6d 65 4c |tr, name|, &nameL|
|00006310| 65 6e 67 74 68 29 0d 09 | 09 09 20 20 26 26 20 6e |ength)..|.. && n|
|00006320| 61 6d 65 4c 65 6e 67 74 | 68 20 3d 3d 20 34 20 29 |ameLengt|h == 4 )|
|00006330| 0d 09 09 09 09 7b 0d 09 | 09 09 09 69 66 20 28 20 |.....{..|...if ( |
|00006340| 28 2a 6e 61 6d 65 20 3d | 3d 20 27 68 27 20 09 20 |(*name =|= 'h' . |
|00006350| 20 20 7c 7c 20 2a 6e 61 | 6d 65 20 3d 3d 20 27 48 | || *na|me == 'H|
|00006360| 27 29 0d 09 09 09 09 20 | 20 26 26 20 28 2a 28 6e |')..... | && (*(n|
|00006370| 61 6d 65 2b 31 29 20 3d | 3d 20 27 61 27 20 7c 7c |ame+1) =|= 'a' |||
|00006380| 20 2a 28 6e 61 6d 65 2b | 31 29 20 3d 3d 20 27 41 | *(name+|1) == 'A|
|00006390| 27 29 0d 09 09 09 09 20 | 20 26 26 20 28 2a 28 6e |')..... | && (*(n|
|000063a0| 61 6d 65 2b 32 29 20 3d | 3d 20 27 77 27 20 7c 7c |ame+2) =|= 'w' |||
|000063b0| 20 2a 28 6e 61 6d 65 2b | 32 29 20 3d 3d 20 27 57 | *(name+|2) == 'W|
|000063c0| 27 29 0d 09 09 09 09 20 | 20 26 26 20 28 2a 28 6e |')..... | && (*(n|
|000063d0| 61 6d 65 2b 33 29 20 3d | 3d 20 27 6b 27 20 7c 7c |ame+3) =|= 'k' |||
|000063e0| 20 2a 28 6e 61 6d 65 2b | 33 29 20 3d 3d 20 27 4b | *(name+|3) == 'K|
|000063f0| 27 29 20 29 0d 09 09 09 | 09 09 7b 0d 09 09 09 09 |') )....|..{.....|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.